27.04.2017, 13:56
pawn Code:
#include <a_samp>
public OnGameModeInit()
{
CreatePickup(1318, 1, 1554.38, -1675.69, 16.195, 0); //This pickup is placed at LSPD, change to where you want it to be.
return true;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (newkeys & KEY_SECONDARY_ATTACK){
if(IsPlayerInRangeOfPoint(playerid, 3.0, 1554.38, -1675.69, 16.195)){ //When changing the pickup position, change this to the same coordinate <<<
SetPlayerPos(playerid, 365.7158, -9.8873, 1001.8516); //Set their position as you stated
SetPlayerInterior(playerid, 9); //Set them into interior ID 9 as that is the cluckin bell interior ID (Reference: http://weedarr.wikidot.com/interior)
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 365.7158, -9.8873, 1001.8516)){ //Check to see if they're near the interior doors
SetPlayerPos(playerid, 1554.38, -1675.69, 16.195); //When changing the pickup position, change this to the same coordinate <<<
SetPlayerInterior(playerid, 0); //Set them back to interior ID 0 so they're in the real world.
}
}
return true;
}