13.02.2011, 08:15
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:
this is in "OnGameModeInIt":
and this is the new public "OnPlayerPickupPickup":
Please help =)
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;
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
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;
}