Just need help !!
#6

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
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.
Reply


Messages In This Thread
Just need help !! - by Unirom Shaw - 12.01.2013, 05:03
Re: Just need help !! - by [HK]Ryder[AN] - 12.01.2013, 05:10
Re: Just need help !! - by Diorturato - 12.01.2013, 05:51
Re: Just need help !! - by EAsT-OAK_510 - 12.01.2013, 06:24
Re: Just need help !! - by Threshold - 12.01.2013, 07:11
Re: Just need help !! - by EAsT-OAK_510 - 12.01.2013, 07:18
Re: Just need help !! - by InActtive™ - 12.01.2013, 07:37
Re: Just need help !! - by Threshold - 12.01.2013, 07:38
Re: Just need help !! - by EAsT-OAK_510 - 12.01.2013, 07:43

Forum Jump:


Users browsing this thread: 5 Guest(s)