30.12.2010, 18:17
use dcmd insteas strcmp... Looks how is that easier ( I use this command on my server):
on OnPlayerCommandText add the line:
pawn Код:
dcmd_plate(playerid,params[])
{
new ID = GetPlayerVehicleID(playerid);
new string[128];
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, azul, "You're not in a vehicle");
if(!strlen(params)) return SendClientMessage(playerid, azul, "Usage: /plate <number/name>");
else
{
SetVehicleNumberPlate(ID, params);
SetVehicleToRespawn(ID);
format(string,sizeof(string),"{F216FA}You've changed your{00EEFF} VehicleID: {D9FA00}%d {FAD900}plate's for: {00FF88}%s",GetVehicleModel(ID),params);
SendClientMessage(playerid, vermelho, string);
PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
}
return 1;
}
pawn Код:
dcmd(plate,5,cmdtext);