SA-MP Forums Archive
[Help] I need tutorial for public phone - 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)
+--- Thread: [Help] I need tutorial for public phone (/showthread.php?tid=294695)



[Help] I need tutorial for public phone - Flanjak - 02.11.2011

Please can some1 post me link where is explained how to make public phone or make for me tutorial for public phone.


Re: [Help] I need tutorial for public phone - ivanVU - 02.11.2011

you can try like this

Код:
CMD:pphone(playerid,parms[])
{
if(IsNearPPhone(playerid))
{
 and here you can put dialog
}
else SendClientMessage(playerid,-1,"ERROR: You are not near public phone..");
return true;
}
Forward
Код:
forward IsNearPPhone(playerid);
The callback
Код:
public IsNearPPhone(playerid)
{
            if(IsPlayerInRangeOfPoint(playerid, 4,x,y,z) || IsPlayerInRangeOfPoint(playerid, 4,x,y,z))
                {
                    return 1;
                }
               else if(IsPlayerInRangeOfPoint(playerid, 4,x,y,z) || IsPlayerInRangeOfPoint(playerid, 4,x,y,z))
                {
                    return 1;
                }
        return 0;
}



Re: [Help] I need tutorial for public phone - AdamCooper - 02.11.2011

Quote:
Originally Posted by ivanVU
Посмотреть сообщение
you can try like this

Код:
CMD:pphone(playerid,parms[])
{
if(IsNearPPhone(playerid))
{
 and here you can put dialog
}
else SendClientMessage(playerid,-1,"ERROR: You are not near public phone..");
return true;
}
Forward
Код:
forward IsNearPPhone(playerid);
The callback
Код:
public IsNearPPhone(playerid)
{
            if(IsPlayerInRangeOfPoint(playerid, 4,x,y,z) || IsPlayerInRangeOfPoint(playerid, 4,x,y,z))
                {
                    return 1;
                }
               else if(IsPlayerInRangeOfPoint(playerid, 4,x,y,z) || IsPlayerInRangeOfPoint(playerid, 4,x,y,z))
                {
                    return 1;
                }
        return 0;
}
never mind