13.02.2011, 11:54
pawn Код:
if(strcmp(cmd, "/changeplate", true) == 0)
#pragma tabsize 0
{
if(PlayerInfo[playerid][pMember] == 1 && PlayerInfo[playerid][pRank] >= 5)
{
cmd = strtok(cmdtext, idx);
if(!strlen(cmd))
{
SendClientMessage(playerid, 0xFFFFFFAA, "USAGE: /changeplate [platenumber (up to 8 chars, use '-' for space char)]");
return 1;
}
if(IsPlayerInAnyVehicle(playerid) == 1)
{
new amount;
amount = strlen(cmd);
SetVehicleNumberPlate(GetPlayerVehicleID(playerid), cmd);
new id = GetVecInfoID( vehicleid );
VehicleInfo[ id ][ vPlate ] = amount;
return 1;
}
else
{
SendClientMessage(playerid, 0xFF9900AA, "SERVER: Nu esti in nicio masina.");
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "SERVER: Nu ai autorizatie pentru a folosi aceasta comanda [PD rank5+].");
}
return 1;
}