Wysłany: 2013-07-22, 00:08
Maxvell
d_b
Wiek: 26 Na forum: 4771 dni Posty: 83
Nick w MP: Kotlet
Piwa : 270
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;
}
Wysłany: 2013-07-22, 00:18
adamoloxD
PaFFner
Wiek: 32 Na forum: 5928 dni Posty: 64
Piwa : 523
Pawn
if( strcmp ( cmd , "/zann" , true ) == 0 || 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 ( 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 ;
}
////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);
}
Wysłany: 2013-07-22, 00:22
Maxvell
d_b
Wiek: 26 Na forum: 4771 dni Posty: 83
Nick w MP: Kotlet
Piwa : 270
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.
Wysłany: 2013-07-22, 00:25
adamoloxD
PaFFner
Wiek: 32 Na forum: 5928 dni Posty: 64
Piwa : 523
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 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);
}
Tagi: komenda :: /zann
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: