checkpoint -
sggassasin - 04.08.2009
hey there i made a script and now when i walk into the checkpoint it seend me under ground
and also how do i make it so you can only see the checkpoint from a sertain distence
Re: checkpoint -
saiberfun - 04.08.2009
don't ask twice n please read what ppl say the other topic just were for problems about functions....
n please give ur OnPlayerEnterCheckPoint
n about dat distancething i dunno
Re: checkpoint -
sggassasin - 04.08.2009
#include <a_samp>
#include <core>
#include <float>
forward PlayerToPoint(Float:radi, playerid, Float

, Float:y, Float:z);
forward shops(playerid);
new Menu

hopsmenu;
public OnPlayerSpawn(playerid)
{
SetPlayerCheckpoint(playerid,-23.9484,-49.5952,1003.5469,3.0);
return 1;
}
public OnGameModeInit()
{
shopsmenu = CreateMenu("shopsmenu", 2,-23.9484,-49.5952,1003.5469);
AddMenuItem(shopsmenu, 0, "1. 5 seeds");
AddMenuItem(shopsmenu, 0, "2. condom");
AddMenuItem(shopsmenu, 0, "3. deer trap");
AddMenuItem(shopsmenu, 0, "4. hunting license");
AddMenuItem(shopsmenu, 0, "5. fishing license");
AddMenuItem(shopsmenu, 0, "6. something ...");
return 1;
}
public OnPlayerSelectedMenuRow(playerid, row)
{
new Menu:CurrentMenu = GetPlayerMenu(playerid);
if(CurrentMenu == shopsmenu)
{
switch(row)
{
case 0:
{
SendClientMessage(playerid,0x33AA33AA,"/rules");
}
case 1:
{
SendClientMessage(playerid,0x33AA33AA,"/rules");
}
case 2:
{
SendClientMessage(playerid,0x33AA33AA,"/rules");
}
case 3:
{
SendClientMessage(playerid,0x33AA33AA,"/rules");
}
case 4:
{
SendClientMessage(playerid,0x33AA33AA,"/rules");
}
case 5:
{
SendClientMessage(playerid,0x33AA33AA,"/rules");
}
case 6:
{
SendClientMessage(playerid,0x33AA33AA,"/rules");
}
}
}
return 1;
}
public PlayerToPoint(Float:radi, playerid, Float

, Float:y, Float:z)
{
if(IsPlayerConnected(playerid))
{
new Float

ldposx, Float

ldposy, Float

ldposz;
new Float:tempposx, Float:tempposy, Float:tempposz;
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
tempposx = (oldposx -x);
tempposy = (oldposy -y);
tempposz = (oldposz -z);
//printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
{
return 1;
}
}
return 0;
}
public OnPlayerExitedMenu(playerid)
{
return 1;
}
public shops(playerid)
{
if (PlayerToPoint(6.0, playerid,-23.9484,-49.5952,1003.5469))
{
ShowMenuForPlayer(shopsmenu,playerid);
}
return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
SetPlayerInterior(playerid,0);
return 1;
}
Re: checkpoint -
saiberfun - 04.08.2009
delete
SetPlayerInterior(playerid,0); from OnEnterPlayerCheckPoint
i didn't ask for the whole script tho only OnPlayerEnterCheckpoint
Re: checkpoint -
sggassasin - 05.08.2009
ok now when i do that it dosent let themenu come up like nothing happens

little help
Re: checkpoint -
sggassasin - 05.08.2009
ok iv got it working so if i go /shop then it come up with a menu wich i hae made and im also woundering how to make it so i can put the menu in the bottom left corner of the screen and also how to make it so you can only see the checkpoint from a rang of 9.0