25.11.2011, 16:54
pawn Код:
//variaveis global
new smoke[MAX_VEHICLES];
new vehid = GetPlayerVehicleID(playerid);
new carid = GetVehicleModel(vehid);
new Fumaceado[MAX_VEHICLES];
if (strcmp(cmdtext, "/fumaca", true) == 0)
{
if(carid == 511 || carid == 512 || carid == 593 || carid == 520 || carid == 553 || carid == 476 || carid == 519 || carid == 460) {
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) {
if(Fumaceado[vehid] == 0) {
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);
SendClientMessage(playerid, COR_AZUL, "Fumaca ligada.");
Fumaceado[vehid] = 1;
}
}
}
return 1;
}
if (strcmp(cmdtext, "/fumacadesligar", true) == 0)
{
DestroyObject(smoke[vehid]);
SendClientMessage(playerid, COR_AZUL, "Fumaca desligada.");
Fumaceado[vehid] = 0;
return 1;
}