09.06.2015, 14:02
My command does not supply vehicles of the server, someone help me ?
PHP код:
CMD:fillcars(playerid,params[])
{
if( PlayerInfo[playerid][pAdmin] == 1 || PlayerInfo[playerid][pMod] == 1 || PlayerInfo[playerid][pDono] == 1)
{
new quantity;
if(sscanf(params, "i", quantity)) return SendClientMessage(playerid, red, "Use: /fillcars [quantity]");
if(quantity< 0 || quantity> 100) return SendClientMessage(playerid, red, "| ERROR | The maximum amount of gas is 100!");
for ( new c = 0 ; c < MAX_VEHICLES ; c ++)
{
new stringgas[256];
carfuel[c] += quantity;
format(stringgas, sizeof(stringgas), "AdmCmd: You supplied % d liter on all cars of San Andreas", quantity);
SendClientMessage(playerid, blue, stringgas);
return 1;
}
}
else
{
SendClientMessage(playerid,red,"| ERROR | You don't have permission!");
}
return 1;
}