Quote:
Originally Posted by ProjectMan
pawn Код:
(strcmp(cmd, "/vehiclespray", true) == 0 ) { new vehicleseat = GetPlayerVehicleSeat(playerid); if(PlayerInfo[playerid][pSprayCan] < 1) { SendClientMessage(playerid, COLOR_RED, "You don't have any Spray Cans!"); return 1; } if(!IsPlayerInAnyVehicle(playerid)) { SendClientMessage(playerid, COLOR_RED, "You must be in a vehicle to do that!"); return 1; } if(vehicleseat != 0) { SendClientMessage(playerid, COLOR_RED, "You must be in the drivers seat to do that!"); return 1; } if(vehicleseat == 0) { new color1, color2; tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_RED, "USAGE: /vehiclespray [Color1] [Color2]"); return 1; } color1 = strval(tmp); tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_RED, "USAGE: /vehiclespray [Color1] [Color2]"); return 1; } color2 = strval(tmp); ChangeVehicleColor(GetPlayerVehicleID(playerid), color1, color2); CallRemoteFunction("OnVehicleRespray", "iiii", playerid, vehicleid, color1, color2); return 1; } }
|
Ahhhhh I see how it works now. So the 4 i's don't need commas in between them no? I take it they define that each of the playerid, vehicleid etc are decimal values. Ok thanks the tutorial example was no good to me. I didn't really understand it. Now I know how to lay it out thanks.