Little problem - 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)
+--- Thread: Little problem (
/showthread.php?tid=602711)
Little problem -
ahameed4755 - 11.03.2016
Getting Error
PHP код:
new pickup1;
pickup1 = CreatePickup(1239, 1, -1807.9540,13.0234,350.0199,-1); // ERROR LINE
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == pickup1)
{
SetPlayerPos(playerid, 2343.802734375 ,547.4677734375 ,6029.7553710938);
}
return 1;
}
Respuesta: Little problem -
Thewin - 11.03.2016
What error?
Re: Little problem -
czerwony03 - 11.03.2016
Tell us, which error do you receive?
Re: Little problem -
Sew_Sumi - 11.03.2016
Damnit guys READ THE CODE...
The pickup creation is in the wrong place...
It's outside of any functions or callbacks.
It needs to be in OnGameModeInit or something equivalent...
Seriously though, OP post the actual output of pawno next time to help us help you.
Re: Little problem -
Joron - 11.03.2016
Quote:
Originally Posted by ahameed4755
Getting Error
PHP код:
new pickup1;
public OnGameModeInit()
{
pickup1 = CreatePickup(1239, 1, -1807.9540,13.0234,350.0199,-1); //Create an Information
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == pickup1)
{
SetPlayerPos(playerid, 2343.802734375 ,547.4677734375 ,6029.7553710938);
}
return 1;
}
|
This should work. if u follow it,btw your positions looks longer than usual recheck that.. maybe am wrong about it,but take a look still...after u /save
its:
Quote:
(skin, Float: x, Float:y, Float:z, Float:Angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo)
|
Look for the x,y,z positions