OnPlayerPickupPickup 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: OnPlayerPickupPickup Problem (
/showthread.php?tid=225160)
OnPlayerPickupPickup Problem -
techg9 - 13.02.2011
hello =)
Im trying to make more then one Pickup that teleport you but when im in the game, only the firts pickup works for me and the others just don't teleport you...
so this is my code:
this is in the top of the script:
PHP код:
new prohqmoll;
new prohqrace;
new prohqair;
new prohqparty;
new prohqbunker;
this is in "OnGameModeInIt":
PHP код:
prohqmoll = AddStaticPickup( 1239, 1, 3172.8423,-14.6863,2.3266 ); // from Base to PrO HQ Moll
prohqparty = AddStaticPickup( 1314, 1, 3037.4607,119.1399,309.0864 ); // from Moll to Party
prohqair = AddStaticPickup( 1310, 1, 3032.8909,124.4601,309.0792 ); // from Moll to HQ Air Jump
prohqbunker = AddStaticPickup( 1273, 1, 3037.7549,129.5287,309.0851 ); // from Moll to Bunker
prohqrace = AddStaticPickup( 1233, 1, 3042.3228,124.4189,309.0880 ); // from Moll to Race
and this is the new public "OnPlayerPickupPickup":
PHP код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid==prohqmoll)
{
SetPlayerPos(playerid, 3044.4688,111.1542,311.4653);
SetPlayerFacingAngle(playerid, 40.7671);
SetPlayerInterior(playerid,0);
SendClientMessage(playerid, 0xFFFF00AA, "BlaBlaBla");
return 1;
}
if(pickupid==prohqrace)
{
SetPlayerPos(playerid, 3005.9109,-77.7580,1137.3007);
SetPlayerFacingAngle(playerid, 299.0028);
SetPlayerInterior(playerid,0);
SendClientMessage(playerid, 0xFFFF00AA, "BlaBlaBla");
return 1;
}
if(pickupid==prohqair)
{
SetPlayerPos(playerid, 3339.5994,122.1895,827.5738);
SetPlayerFacingAngle(playerid, 91.8642);
SetPlayerInterior(playerid,0);
SendClientMessage(playerid, 0xFFFF00AA, "BlaBlaBla");
return 1;
}
if(pickupid==prohqbunker)
{
SetPlayerPos(playerid, 3238.2368,65.0437,10.9989);
SetPlayerFacingAngle(playerid, 94.3709);
SetPlayerInterior(playerid,0);
SendClientMessage(playerid, 0xFFFF00AA, "BlaBlaBla");
return 1;
}
if(pickupid==prohqparty)
{
SetPlayerPos(playerid, 3039.2349,107.5791,286.9293);
SetPlayerFacingAngle(playerid, 3.1667);
SetPlayerInterior(playerid,0);
SendClientMessage(playerid, 0xFFFF00AA, "BlaBlaBla");
return 1;
}
return 0;
}
Please help =)
Re: OnPlayerPickupPickup Problem -
Ash. - 13.02.2011
Try printing out the pickupid when you enter it (In OnPlayerPickUpPickup)
Like so;
pawn Код:
printf("I entered: %i pickup", pickupid);