[HELP] /plantbomb
#2

IsPlayerInAnyVehicle

Try This:
pawn Код:
if (strcmp("/plantbomb", cmdtext, true, 7) == 0)
   {
        if(bombh[playerid] == 1)
        {
                        if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,COLOR_GRAD2,"You can't plant bombs from a vehicle!);
            new Float:X;
            new Float:Y;
            new Float:Z;
            new Float:A;
            ApplyAnimation(playerid, "
BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
            GetPlayerPos(playerid,X,Y,Z);
            GetPlayerFacingAngle(playerid, A);
            DestroyObject(bomb);
            X += (1 * floatsin(-A, degrees));
            Y += (1 * floatcos(-A, degrees));
            bomb = CreateObject(1654, X, Y, Z-0.8, 0, 0, 0);
            bombh[playerid]=0;
            bombp[playerid]=1;
        }
        else
        {
            SendClientMessage(playerid,COLOR_GRAD2,"
* You don't have a bomb to plant!");
            return 1;
        }
        return 1;
    }
Reply


Messages In This Thread
[HELP] /plantbomb - by ArTisT - 12.05.2009, 16:54
Re: [HELP] /plantbomb - by member - 12.05.2009, 17:01
Re: [HELP] /plantbomb - by ArTisT - 12.05.2009, 17:25
Re: [HELP] /plantbomb - by member - 12.05.2009, 17:44

Forum Jump:


Users browsing this thread: 1 Guest(s)