25.11.2011, 16:56
pawn Код:
new smoke[MAX_VEHICLES];
if (!strcmp(cmdtext, "/fumaca", true))
{
new vehid = GetPlayerVehicleID(playerid);
new carid = GetVehicleModel(vehid);
if(carid == 511 || carid == 512 || carid == 593 || carid == 520 || carid == 553 || carid == 476 || carid == 519 || carid == 460)
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
if(smoke[vehid] == 0xFFFF)
{
smoke[vehid] = CreateObject(2780,0,0,0,0,0,50000);
AttachObjectToVehicle(smoke[vehid], vehid, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
return SendClientMessage(playerid, COLOR_WHITE, "Fumaca ligada.");
}
else
{
DestroyObject(smoke[vehid]);
return SendClientMessage(playerid, COLOR_WHITE, "Fumaca desligada.");
}
}
else return SendClientMessage(playerid, -1, "Vocк nгo estб dirigindo a aeronave!");
}
else return SendClientMessage(playerid, -1, "Vocк nгo estб em uma aeronave!");
}