I have a pickup - 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: I have a pickup (
/showthread.php?tid=75106)
I have a pickup -
aspire5630 - 28.04.2009
i have this
//================================================== ============================ Jail
CreateObject(1501, 619.560486, -567.535645, 25.137306, 0.0000, 0.0000, 90.0000);//Door
AddStaticPickup(1239, 2, 2610.981750, -583.144531, 17.626646);//Icon Floor
AddStaticPickup(1239, 2, 619.161438, -566.806091, 25.512650);//Icon Roof
return 1;
}
when i walk into the object i dont get teleported
anyone know why
Re: I have a pickup -
afei - 28.04.2009
Uh.. Where is the code where you try to change the players position ?
Re: I have a pickup -
aspire5630 - 28.04.2009
Quote:
Originally Posted by afei™
Uh.. Where is the code where you try to change the players position ?
|
Код:
if(pickupid == 20) { // G Down
SendClientMessage(playerid, 0xA9A9A9AA, "|_Police HQ - B 1_|");
SetPlayerPos(playerid, 610.9496,-583.5366,18.2033); // Spawn Level
SetCameraBehindPlayer(playerid);
}
else
if(pickupid == 21) { // B 2 Up
SendClientMessage(playerid, 0xA9A9A9AA, "|_Police HQ - B 1_|");
SetPlayerPos(playerid, 618.5887,-566.7526,26.1432); // Spawn Level
SetCameraBehindPlayer(playerid);
}
return 1;
}
Re: I have a pickup -
Pyrokid - 29.04.2009
You must define the pickup.
pawn Код:
//On top of the script
new pickup1, pickup2;
//OnGameModeInit
pickup1 = CreatePickup(1239, 2, 2610.981750, -583.144531, 17.626646);//Icon Floor
pickup2 = CreatePickup(1239, 2, 619.161438, -566.806091, 25.512650);//Icon Roof
//Then check it in OnPlayerPickUpPickup
if(pickupid == pickup1) { // G Down
SendClientMessage(playerid, 0xA9A9A9AA, "|_Police HQ - B 1_|");
SetPlayerPos(playerid, 610.9496,-583.5366,18.2033); // Spawn Level
SetCameraBehindPlayer(playerid);
}
else
if(pickupid == pickup2) { // B 2 Up
SendClientMessage(playerid, 0xA9A9A9AA, "|_Police HQ - B 1_|");
SetPlayerPos(playerid, 618.5887,-566.7526,26.1432); // Spawn Level
SetCameraBehindPlayer(playerid);
}
return 1;
}
Re: I have a pickup -
aspire5630 - 29.04.2009
Quote:
Originally Posted by Pyrokid
You must define the pickup.
pawn Код:
//On top of the script new pickup1, pickup2;
//OnGameModeInit pickup1 = CreatePickup(1239, 2, 2610.981750, -583.144531, 17.626646);//Icon Floor pickup2 = CreatePickup(1239, 2, 619.161438, -566.806091, 25.512650);//Icon Roof
//Then check it in OnPlayerPickUpPickup if(pickupid == pickup1) { // G Down SendClientMessage(playerid, 0xA9A9A9AA, "|_Police HQ - B 1_|"); SetPlayerPos(playerid, 610.9496,-583.5366,18.2033); // Spawn Level SetCameraBehindPlayer(playerid); } else if(pickupid == pickup2) { // B 2 Up SendClientMessage(playerid, 0xA9A9A9AA, "|_Police HQ - B 1_|"); SetPlayerPos(playerid, 618.5887,-566.7526,26.1432); // Spawn Level SetCameraBehindPlayer(playerid); } return 1; }
|
Ok thanks, it works but only one of the pickups work
Код:
if(pickupid == pickup1) { // G Down
SendClientMessage(playerid, 0xA9A9A9AA, "|_Police HQ - B 1_|");
SetPlayerPos(playerid, 610.9496,-583.5366,18.2033); // Spawn Level
SetCameraBehindPlayer(playerid);
}
this one doesent work, the other one does ;P
The object i, shows up but its solid when you walk into it you dont get teleported
Re: FIXED -
aspire5630 - 29.04.2009
I HAVE FIXED IT