SA-MP Forums Archive
Life raft help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Life raft help (/showthread.php?tid=191144)



Life raft help - Haydz - 18.11.2010

fixed..

8char


Re: Life raft help - Retardedwolf - 18.11.2010

isPlayerInAnyVehicle


Re: Life raft help - Haydz - 18.11.2010

would this work?
Error:
pawn Код:
C:\Documents and Settings\Hayden Bruin\Desktop\UlitmateDM\gamemodes\SAP.pwn(2293) : error 029: invalid expression, assumed zero
pawn Код:
COMMAND:liferaft(playerid, params[])
{
    new Float:health;
    new veh;
    veh = GetPlayerVehicleID(playerid);
    GetVehicleHealth(veh, health);
    if(IsPlayerInAnyVehicle(playerid)) else SendClientMessage(playerid, COLOR_RED,"You need to be in a plane to deploy the liferafts");
    if(health >500) return SendClientMessage(playerid,COLOR_RED,"You can only spawn the life raft when you're in an emergency");
    SendClientMessage(playerid,COLOR_GREEN,"Liferafts deployed");
    new Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, x, y, z);
    CreateVehicle(473, x, y, z-5, 82.2873, 0, 1, 59);
    return 1;
}



Re: Life raft help - Retardedwolf - 18.11.2010

Which line is that? (2293)


Re: Life raft help - Haydz - 18.11.2010

line 2293
pawn Код:
if(IsPlayerInAnyVehicle(playerid)) else SendClientMessage(playerid, COLOR_RED,"You need to be in a plane to deploy the liferafts");