29.01.2014, 23:30
pawn Код:
CMD:changeplate(playerid, params[])
{
if(Player_Data[playerid][Donator] == 0)
{
return SCM(playerid, RED, "You need to have atleast Donator level 1 for this command.");
}
else
{
if(GetPlayerState(playerid != PLAYER_STATE_DRIVER))
{
return SCM(playerid, RED, "You need to be in a vehicle to change it's numberplate.");
}
else
{
new Cplate[8],
VehID = GetPlayerVehicleID(playerid);
if(sscanf(params, "s[8]", Cplate)) return SCM(playerid, GREY, "[SERVER]: Usage: /changeplate [NUMBER/WORD COMBINATION] - Maximum 8 numbers/letters");
if(8 < strlen(Cplate) < 1)
{
SCM(playerid, GREY, "[SERVER]: ERROR: Your numberplate must be be between 1 and 8 characters");
}
else
{
SetVehicleNumberPlate(VehID, Cplate);
return 1;
}
}
}
return 1;
}