Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2013-07-22, 00:08


Maxvell

d_b






Wiek: 26
Na forum: 4771 dni
Posty: 83
Nick w MP: Kotlet

Piwa: 270

Respekt: 65

Siema, prosze was o pomoc z tym jak zrobic zeby ta komenda byla na nick?.

Kod:

if(strcmp(cmd, "/zann", true) == 0 || strcmp(cmd, "/zannounce", true) == 0){
if(zarzad[playerid])
{
new msg[256], seconds;

seconds = strval(strtok(cmdtext,idx));
if(seconds == 0)
{
SendClientMessage(playerid, COLOR_WHITE,"/zann [czas] [text]");
return 1;
}
msg = strrest(cmdtext,idx);
format(tmp,sizeof(tmp),"~r~Zarz?d:~n~~w~%s",msg);
seconds = seconds * 1000;
GameTextForAll(tmp,seconds,3);
}
return 1;
}


Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-07-22, 00:18


adamoloxD

PaFFner






Wiek: 32
Na forum: 5928 dni
Posty: 64

Piwa: 523

Respekt: 72

Pawn



if(strcmp(cmd"/zann"true) == || strcmp(cmd"/zannounce"true) == 0){ 
    //if(zarzad[playerid]) 
    if (strcmp(Nick(playerid),"TU_NICK",true) == 0)
    { 
        new msg[256], seconds; 

        seconds strval(strtok(cmdtext,idx)); 
        if(seconds == 0) 
        {             
            SendClientMessage(playeridCOLOR_WHITE,"/zann [czas] [text]"); 
            return 1; 
        } 
        msg strrest(cmdtext,idx); 
        format(tmp,sizeof(tmp),"~r~Zarz?d:~n~~w~%s",msg); 
        seconds seconds 1000; 
        GameTextForAll(tmp,seconds,3); 
    }         
    return 1; 
}

////Gdzie? na d?? (chyba ?e masz, to popraw na g?rze na swoje)
stock Nick(playerid)
{
    new nick[MAX_PLAYER_NAME];
    GetPlayerName(playerid,nick,sizeof(nick));
    return nick;
}


Podpis
Kod:


public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
return DestroyVehicle(vehicleid);
}
Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-07-22, 00:22


Maxvell

d_b






Wiek: 26
Na forum: 4771 dni
Posty: 83
Nick w MP: Kotlet

Piwa: 270

Respekt: 65

mozesz jasniej bo mam takie errorki :)

Kod:

C:\Users\?ukasz\Downloads\mapka.pwn(640) : warning 219: local variable "Nick" shadows a variable at a preceding level
C:\Users\?ukasz\Downloads\mapka.pwn(1446) : error 079: inconsistent return types (array & non-array)
C:\Users\?ukasz\Downloads\mapka.pwn(1506) : error 079: inconsistent return types (array & non-array)
C:\Users\?ukasz\Downloads\mapka.pwn(1508) : error 079: inconsistent return types (array & non-array)
C:\Users\?ukasz\Downloads\mapka.pwn(1513) : error 079: inconsistent return types (array & non-array)
C:\Users\?ukasz\Downloads\mapka.pwn(1518) : error 079: inconsistent return types (array & non-array)
C:\Users\?ukasz\Downloads\mapka.pwn(1529) : error 079: inconsistent return types (array & non-array)
C:\Users\?ukasz\Downloads\mapka.pwn(1537) : error 079: inconsistent return types (array & non-array)
C:\Users\?ukasz\Downloads\mapka.pwn(1557) : error 079: inconsistent return types (array & non-array)
C:\Users\?ukasz\Downloads\mapka.pwn(1564) : error 079: inconsistent return types (array & non-array)
C:\Users\?ukasz\Downloads\mapka.pwn(1569) : error 079: inconsistent return types (array & non-array)
C:\Users\?ukasz\Downloads\mapka.pwn(1576) : error 079: inconsistent return types (array & non-array)
C:\Users\?ukasz\Downloads\mapka.pwn(1583) : error 079: inconsistent return types (array & non-array)
C:\Users\?ukasz\Downloads\mapka.pwn(1588) : error 079: inconsistent return types (array & non-array)
C:\Users\?ukasz\Downloads\mapka.pwn(1594) : error 079: inconsistent return types (array & non-array)
C:\Users\?ukasz\Downloads\mapka.pwn(1606) : error 079: inconsistent return types (array & non-array)
C:\Users\?ukasz\Downloads\mapka.pwn(1610) : error 079: inconsistent return types (array & non-array)
C:\Users\?ukasz\Downloads\mapka.pwn(1614) : error 079: inconsistent return types (array & non-array)
C:\Users\?ukasz\Downloads\mapka.pwn(1629) : error 079: inconsistent return types (array & non-array)
C:\Users\?ukasz\Downloads\mapka.pwn(1634) : error 079: inconsistent return types (array & non-array)
C:\Users\?ukasz\Downloads\mapka.pwn(1640) : error 079: inconsistent return types (array & non-array)
C:\Users\?ukasz\Downloads\mapka.pwn(1647) : error 079: inconsistent return types (array & non-array)
C:\Users\?ukasz\Downloads\mapka.pwn(1648) : error 079: inconsistent return types (array & non-array)
C:\Users\?ukasz\Downloads\mapka.pwn(1655) : error 079: inconsistent return types (array & non-array)
C:\Users\?ukasz\Downloads\mapka.pwn(1667) : error 079: inconsistent return types (array & non-array)
C:\Users\?ukasz\Downloads\mapka.pwn(1679) : error 079: inconsistent return types (array & non-array)
C:\Users\?ukasz\Downloads\mapka.pwn(1686) : error 079: inconsistent return types (array & non-array)

Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


26 Errors.


Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-07-22, 00:25


adamoloxD

PaFFner






Wiek: 32
Na forum: 5928 dni
Posty: 64

Piwa: 523

Respekt: 72

Masz w mapie, skrypcie funkcj? o sk?adzie podobnej do tej Nick co Ci tam napisa?em? Je?li tak, usu? moj?, i w komendzie podmie?
Pawn
Nick(..)
na swoje. Natomiast je??i nie masz to wrzu? tego stock'a gdzie? na sam d??, lecz nie do ?adnego callback'a, a komend? to wiadomo gdzie.

Podpis
Kod:


public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
return DestroyVehicle(vehicleid);
}
Postaw piwo autorowi tego posta
 

 
Tagi: komenda :: /zann
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » PAWN Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku