C:\Users\Alexunder\Desktop\godfatherNEW.pwn(36761) : warning 202: number of arguments does not match definition C:\Users\Alexunder\Desktop\godfatherNEW.pwn(36761) : warning 202: number of arguments does not match definition Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Warnings.
//----------------------[VSlap]--------------- if(strcmp(cmd, "/vslap", true) == 0) { if(PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pAdmin] >= 1) { new id = strval(tmp); tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid,COLOR_GREEN ,"[HELP]: /vslap [carid]"); return 1; } id = GetPlayerVehicleID(playerid); new Float:x, Float:y, Float:z; GetVehiclePos(id, x, y, z); SetVehiclePos(id, x, y, z+5); format(string, sizeof(string),"[ADMIN] %s has slapped car id %s",GetPlayerName(playerid), id); return 1; } }
format(string, sizeof(string),"[ADMIN] %s has slapped car id %s",GetPlayerName(playerid), id);
new playerName [ MAX_PLAYER_NAME ];
GetPlayerName( playerid, playerName, sizeof( playerName ) );
format( string, sizeof ( string ), "[ADMIN] %s has slapped car id %s",playerName, id);
warning 217: loose indentation warning 203: symbol is never used: ****
if(strcmp(cmd, "/vslap", true) == 0) { if(PlayerInfo[playerid][pAdmin] >= 1) { new id = strval(tmp); tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid,COLOR_GREEN ,"[HELP]: /vslap [carid]"); return 1; } id = GetPlayerVehicleID(playerid); new Float:x, Float:y, Float:z; GetVehiclePos(id, x, y, z); SetVehiclePos(id, x, y, z+5); format(string, sizeof(string),"[ADMIN] %s has slapped car id %s",GetPlayerVehicleID(playerid), id); return 1; } }
Thanks i just solved the problem.
Here de script for others person. Код:
if(strcmp(cmd, "/vslap", true) == 0) { if(PlayerInfo[playerid][pAdmin] >= 1) { new id = strval(tmp); tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid,COLOR_GREEN ,"[HELP]: /vslap [carid]"); return 1; } id = GetPlayerVehicleID(playerid); new Float:x, Float:y, Float:z; GetVehiclePos(id, x, y, z); SetVehiclePos(id, x, y, z+5); format(string, sizeof(string),"[ADMIN] %s has slapped car id %s",GetPlayerVehicleID(playerid), id); return 1; } } |
if(strcmp(cmd, "/vslap", true) == 0) {
if(PlayerInfo[playerid][pAdmin] >= 1) {
new id = strval(tmp), plName [ 24 ];
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid,COLOR_GREEN ,"[HELP]: /vslap [carid]");
return 1;
}
GetPlayerName( playerid, plName, 24 );
new Float:x, Float:y, Float:z;
GetVehiclePos(id, x, y, z);
SetVehiclePos(id, x, y, z+5);
format(string, sizeof(string),"[ADMIN] %s has slapped car id %s",plName, id);
return 1;
}
}