Quote:
Originally Posted by BenzoAMG
This will fit the bill:
pawn Код:
new Siren[MAX_VEHICLES]; new SObj[MAX_VEHICLES];
public OnPlayerCommandText(playerid, cmdtext[]) { if(strcmp("/siren", cmdtext, true) == 0) { new veh; veh = GetPlayerVehicleID(playerid); if(!Siren[veh]) { SObj[veh] = CreateObject(19419, 0, 0, 0, 0, 0, 0); AttachObjectToVehicle(SObj[veh], veh, 0.009999, -0.019999, 0.944999, 0.000000, 0.000000, 0.000000); SendClientMessage(playerid, red, "You've Added a siren to your vehicle"); Siren[veh] = 1; return 1; } else { DestroyObject(SObj[veh]); Siren[veh] = 0; SendClientMessage(playerid, red, "You've removed a siren from your vehicle"); return 1; } return 1; } return 0; }
@EAsT-OAK_510 - Just noticed your signature ![Grin](images/smilies/biggrin.gif)
|
Heh, since I am learning a lot now I said I should as well try helping out, whether if I am right or wrong. Like that I can know how "good" I am. And thanks for editing the code a bit for me.