SA-MP Forums Archive
GATES - 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: GATES (/showthread.php?tid=262938)



GATES - Riddy - 19.06.2011

pawn Код:
if(IsPlayerInRangeOfPoint(playerid,9,778.0752,-1329.9805,13.5469)) //This is in the middle of the gate at SANNews
        { //News Agency
            if(!IsANewsReporter(playerid)) return SendClientMessage(playerid,COLOR_GREY,"   You are not a {000000}News Reporter!");
            if(sangate == 0)
            {
                sangate = 1;
                MoveObject(sangateoneobj, 289.919067, -1547.427734, 27.193420, 1.500000);
            }
            else if(sangate == 1)
            {
                sangate = 0;
                MoveObject(sangateoneobj, 283.870544, -1543.398804, 27.193420, 1.500000);
            }
        }
pawn Код:
sangateoneobj = CreateObject(976, 773.7568359375, -1384.501953125, 12.858623504639, 0, 0, 0);
    sangateoneobj =  CreateObject(976, 774.02679443359, -1329.7847900391, 12.546875, 0, 0, 0); // This in the gates
Ok, so, i do /gate ig, nothing happens, Is it the IsPlayerInRangeOfPoint?, I am have been trying to fix.


Re: GATES - abubaker98 - 19.06.2011

dude did you made this callback


onplayercommandtext

or not i will help you but give me full answer


Re: GATES - Riddy - 20.06.2011

I put this onplayercommandtext for sure

edit - this is added at the endof the /gate cmd on SARP, i was trying to make SAN Gate


Re: GATES - Riddy - 20.06.2011

*BUMP!*


Re: GATES - *IsBack - 20.06.2011

Quote:
Originally Posted by riddy123
Посмотреть сообщение
*BUMP!*
pawn Код:
if(IsPlayerInRangeOfPoint(playerid,9,778.0752,-1329.9805,13.5469)) //This is in the middle of the gate at SANNews
        { //News Agency
 SendClientMessage(playerid,COLOR_GREY," IsPlayerInRangeOfPoint works!");
            if(!IsANewsReporter(playerid)) return SendClientMessage(playerid,COLOR_GREY,"   You are not a {000000}News Reporter!");
            if(sangate == 0)
            {
                sangate = 1;
                MoveObject(sangateoneobj, 289.919067, -1547.427734, 27.193420, 1.500000);
            }
            else if(sangate == 1)
            {
                sangate = 0;
                MoveObject(sangateoneobj, 283.870544, -1543.398804, 27.193420, 1.500000);
            }
        }
Try this one, and check if it shows you "IsPlayerInRangeOfPoint works!"


Re: GATES - =WoR=Varth - 20.06.2011

pawn Код:
new sangateoneobj[2];


sangateoneobj[0] = CreateObject(976, 773.7568359375, -1384.501953125, 12.858623504639, 0, 0, 0);
sangateoneobj[1] =  CreateObject(976, 774.02679443359, -1329.7847900391, 12.546875, 0, 0, 0); // This in the gates



Re: GATES - Riddy - 20.06.2011

Quote:
Originally Posted by *IsBack
Посмотреть сообщение
pawn Код:
if(IsPlayerInRangeOfPoint(playerid,9,778.0752,-1329.9805,13.5469)) //This is in the middle of the gate at SANNews
        { //News Agency
 SendClientMessage(playerid,COLOR_GREY," IsPlayerInRangeOfPoint works!");
            if(!IsANewsReporter(playerid)) return SendClientMessage(playerid,COLOR_GREY,"   You are not a {000000}News Reporter!");
            if(sangate == 0)
            {
                sangate = 1;
                MoveObject(sangateoneobj, 289.919067, -1547.427734, 27.193420, 1.500000);
            }
            else if(sangate == 1)
            {
                sangate = 0;
                MoveObject(sangateoneobj, 283.870544, -1543.398804, 27.193420, 1.500000);
            }
        }
Try this one, and check if it shows you "IsPlayerInRangeOfPoint works!"
Doesnt seem to work, Any other soulution


Re: GATES - =WoR=Varth - 20.06.2011

You don't get the message (" IsPlayerInRangeOfPoint works!")? if not then you put the wrong pos.
Have you tried mine?

EDIT:
Try this
pawn Код:
if(IsPlayerInRangeOfPoint(playerid,9,778.0752,-1329.9805,13.5469)) //This is in the middle of the gate at SANNews
        { //News Agency
            if(!IsANewsReporter(playerid)) return SendClientMessage(playerid,COLOR_GREY,"   You are not a {000000}News Reporter!");
            if(sangate == 0)
            {
                sangate = 1;
                MoveObject(sangateoneobj, 289.919067, -1547.427734, 27.193420, 1.500000);
            }
            else if(sangate == 1)
            {
                sangate = 0;
                MoveObject(sangateoneobj, 283.870544, -1543.398804, 27.193420, 1.500000);
            }
        }
else
        {
            SendClientMessage(playerid,0xFFFFFFFF," You put the wrong pos!");
        }
Also make sure you put return 1;


Re: GATES - DRIFT_HUNTER - 21.06.2011

You people are so lazy....why you just don't add a debug?
pawn Код:
print("These part is called");
//or use SendClientMessage



Re: GATES - Smurf[SMURF] - 21.06.2011

are you sure you are a news reporter lol