dcmd_i(playerid, params[]) { new ID,string[256],string2[256],name[60]; if(sscanf(params, "i", ID)) SendClientMessage(playerid, COLOR_WHITE, "USAGE: /i [id]"); else if(IsPlayerConnected(ID) == 0) SendClientMessage(playerid, COLOR_RED, "Player is not connected!"); else { HideDraw(playerid); GetPlayerName(ID, name, 60); new carid = GetPlayerVehicleID(ID); TextDrawShowForPlayer(playerid,text44); TextDrawShowForPlayer(playerid,text45); TextDrawShowForPlayer(playerid,PCBOX); if(!IsPlayerInAnyVehicle(ID)) { format(string, 256, "~y~Player Info: ~r~~h~%s[%d]~n~~n~~g~Location:~w~%s~n~~g~Money:~w~%d~n~~g~Wanted Level:~w~%d~n~~g~Drive:~w~none", name, ID, ReturnPlayerZone(ID),GetPlayerMoney(ID),GetPlayerWantedLevel(ID)); }else if(IsPlayerInAnyVehicle(ID)) { format(string, 256, "~y~Player Info: ~r~~h~%s[%d]~n~~n~~g~Location:~w~%s~n~~g~Money:~w~%d~n~~g~Wanted Level:~w~%d~n~~g~Drive:~w~%s", name, ID, ReturnPlayerZone(ID),GetPlayerMoney(ID),GetPlayerWantedLevel(ID),VehicleNames[GetVehicleModel(carid)-400]); } TextDrawSetString(text44,string); format(string2,256,"~n~~n~~n~~n~~n~~n~~n~~w~Type ~r~~h~LMB ~w~For Hide Thes~n~~w~Boxes!"); TextDrawSetString(text45,string2); } return 1; }
CMD:i(playerid, params[]) { new ID,string[256],string2[256],name[60]; if(sscanf(params, "i", ID)) SendClientMessage(playerid, COLOR_WHITE, "USAGE: /i [id]"); else if(IsPlayerConnected(ID) == 0) SendClientMessage(playerid, COLOR_RED, "Player is not connected!"); else { HideDraw(playerid); GetPlayerName(ID, name, 60); new carid = GetPlayerVehicleID(ID); TextDrawShowForPlayer(playerid,text44); TextDrawShowForPlayer(playerid,text45); TextDrawShowForPlayer(playerid,PCBOX); if(!IsPlayerInAnyVehicle(ID)) { format(string, 256, "~y~Player Info: ~r~~h~%s[%d]~n~~n~~g~Location:~w~%s~n~~g~Money:~w~%d~n~~g~Wanted Level:~w~%d~n~~g~Drive:~w~none", name, ID, ReturnPlayerZone(ID),GetPlayerMoney(ID),GetPlayerWantedLevel(ID)); }else if(IsPlayerInAnyVehicle(ID)) { format(string, 256, "~y~Player Info: ~r~~h~%s[%d]~n~~n~~g~Location:~w~%s~n~~g~Money:~w~%d~n~~g~Wanted Level:~w~%d~n~~g~Drive:~w~%s", name, ID, ReturnPlayerZone(ID),GetPlayerMoney(ID),GetPlayerWantedLevel(ID),VehicleNames[GetVehicleModel(carid)-400]); } TextDrawSetString(text44,string); format(string2,256,"~n~~n~~n~~n~~n~~n~~n~~w~Type ~r~~h~LMB ~w~For Hide Thes~n~~w~Boxes!"); TextDrawSetString(text45,string2); } return 1; }
CMD:i(playerid, params[])
{
new ID,string[256],string2[256],name[60];
if(sscanf(params, "i", ID)) SendClientMessage(playerid, COLOR_WHITE, "USAGE: /i [id]");
else
{
HideDraw(playerid);
GetPlayerName(ID, name, 60);
new carid = GetPlayerVehicleID(ID);
TextDrawShowForPlayer(playerid,text44);
TextDrawShowForPlayer(playerid,text45);
TextDrawShowForPlayer(playerid,PCBOX);
if(!IsPlayerInAnyVehicle(ID))
{
format(string, 256, "~y~Player Info: ~r~~h~%s[%d]~n~~n~~g~Location:~w~%s~n~~g~Money:~w~%d~n~~g~Wanted Level:~w~%d~n~~g~Drive:~w~none", name, ID, ReturnPlayerZone(ID),GetPlayerMoney(ID),GetPlayerWantedLevel(ID));
}
else if(IsPlayerInAnyVehicle(ID))
{
format(string, 256, "~y~Player Info: ~r~~h~%s[%d]~n~~n~~g~Location:~w~%s~n~~g~Money:~w~%d~n~~g~Wanted Level:~w~%d~n~~g~Drive:~w~%s", name, ID, ReturnPlayerZone(ID),GetPlayerMoney(ID),GetPlayerWantedLevel(ID),VehicleNames[GetVehicleModel(carid)-400]);
}
TextDrawSetString(text44,string);
format(string2,256,"~n~~n~~n~~n~~n~~n~~n~~w~Type ~r~~h~LMB ~w~For Hide Thes~n~~w~Boxes!");
TextDrawSetString(text45,string2);
}
return 1;
}
You don't need IsPlayerConnected(), they wouldn't be able to use the CMD if they weren't connected.
pawn Код:
|
ID is already defined somewhere else.(Reason of 1st error.)
ReturnPlayerZone isn't defined at-all.(Reason for All but 1 error.) Nothing to do with it being DCMD or ZCMD. |