20.01.2011, 04:16
Quote:
Dcmd: http://hood.pastebin.com/j5DTwc1m
Strok: http://hood.pastebin.com/spD2pRCM Or use what Tee said |
pawn Код:
if (strcmp("/cc", cmdtext, true, 3) == 0)
{
if(IsPlayerInAnyVehicle(playerid))
{
new params[2];
new totalparams;
for(new cell;cell<strlen(cmdtext);cell++)
{
if(cmdtext[cell]==' ')
{
params[totalparams]=cell+1;
totalparams++;
if(totalparams==sizeof(params))break;
}
}
if(totalparams!=sizeof(params))return SendClientMessage(playerid,COLOR_NAVY,"USAGE: /cc [Color1] [Color2]");
ChangeVehicleColor(GetPlayerVehicleID(playerid),strval(cmdtext[params[0]]),strval(cmdtext[params[1]]));
SendClientMessage(playerid,COLOR_NAVY,"VEHICLE: Your vehicles car color has now been changed.");
}
else SendClientMessage(playerid,COLOR_NAVY,"VEHICLE: You must be in a vehicle to change your car color.");
return 1;
}