help (AGAIN) - 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: help (AGAIN) (
/showthread.php?tid=278694)
help (AGAIN) -
Zonoya - 23.08.2011
hey guys i took a look at Haydz liferaft script and i got some of its errors out but when i tried to compile it ive narrowed the errors to 4 errors can u help me with em
Code:
Code:
if (strcmp("/liferaft", cmdtext, true) == 0)
{
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");
GetPlayerPos(playerid, X, Y, Z);
CreateVehicle(473, X, Y, Z-5, 82.2873, 0, 1, 59);
}
return 1;
}
Errors:
Code:
C:\Documents and Settings\Rhys\Desktop\GTA SA Car, plane, Bike, Cleo, Boat ect mods\Carrier Wars\filterscripts\Interiors.pwn(274) : error 010: invalid function or declaration
C:\Documents and Settings\Rhys\Desktop\GTA SA Car, plane, Bike, Cleo, Boat ect mods\Carrier Wars\filterscripts\Interiors.pwn(278) : error 010: invalid function or declaration
C:\Documents and Settings\Rhys\Desktop\GTA SA Car, plane, Bike, Cleo, Boat ect mods\Carrier Wars\filterscripts\Interiors.pwn(279) : error 010: invalid function or declaration
C:\Documents and Settings\Rhys\Desktop\GTA SA Car, plane, Bike, Cleo, Boat ect mods\Carrier Wars\filterscripts\Interiors.pwn(284) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
please help
Re: help (AGAIN) -
Wesley221 - 23.08.2011
Do you have
pawn Code:
Float:x, Float:y, Float:z, Float:health
? If not, add them to your command
Re: help (AGAIN) -
Zonoya - 23.08.2011
that caused alot of trouble when i added them but ill try again
Re: help (AGAIN) -
Zonoya - 23.08.2011
same 4 errors
Re: help (AGAIN) -
Wesley221 - 23.08.2011
pawn Code:
CMD:liferaft(playerid, params[])
{
new Float:health, Float:X, Float:Y, Float:Z;
new veh = GetPlayerVehicleID(playerid);
GetVehicleHealth(veh, health);
if(IsPlayerInAnyVehicle(playerid))
{
if(health >500) return SendClientMessage(playerid,-1,"You can only spawn the life raft when you're in an emergency");
SendClientMessage(playerid,-1,"Liferafts deployed");
GetPlayerPos(playerid, X, Y, Z);
CreateVehicle(473, X, Y, Z-5, 82.2873, 0, 1, 59);
} else SendClientMessage(playerid, -1,"You need to be in a plane to deploy the liferafts");
return 1;
}
This worked for me. Just change it back to strcmp