#1

Hey, i made it that if /new check ifisplayerinrangeofpoint do this else do blabla
pawn Код:
if(strcmp(cmdtext, "/new") == 0)
{
        if(IsPlayerInRangeOfPoint(playerid, 9.0, 1958.3783,1343.1572,15.3746))
        {
          SetPlayerPos(playerid,3057.6040,-1884.7632,1.9765);
          return 1;
        }
        else
        {
          SendClientMessage(playerid,red,"Go To Your spawn point");
          return 1;
        }
       
}
It works but I Fail in making it SetPlayerPos If playerisinrangepoint ,1968.4852,-2207.1484,13.5469 And 2015.1097,1546.3257,10.9667 there too!!! Please help me cose i want /new to transport player to the Setplayerpos if player is in those 2 places i wrote above, else sendclientmessage go to your spawn point
THANKS!!
Reply
#2

Код:
if(strcmp(cmdtext, "/new") == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 9.0, 1958.3783,1343.1572,15.3746) || IsPlayerInRangeOfPoint(playerid, 9.0, 2015.1097,1546.3257,10.9667))
return SetPlayerPos(playerid,3057.6040,-1884.7632,1.9765);
else return SendClientMessage(playerid,red,"Go To Your spawn point");
}
Reply
#3

:O thanks
gona try it now
Reply
#4

Sorry But it doesnt teleport me to new place, wherever i am it just appears Go To your Spawn point
PLEASE HELP!
Reply
#5

The easy way to learn how to make teleport command is go to wiki page i learn over there to without any help just be patient and you will learn
Reply
#6

Just remove return 1; from each line and puti if before closing cmd
Reply
#7

And what he will get with that just more errors and warnings or crashing pawno.
Reply
#8

Quote:
Originally Posted by patchkinson
Hey, i made it that if /new check ifisplayerinrangeofpoint do this else do blabla
pawn Код:
if(strcmp(cmdtext, "/new") == 0)
{
        if(IsPlayerInRangeOfPoint(playerid, 9.0, 1958.3783,1343.1572,15.3746))
        {
          SetPlayerPos(playerid,3057.6040,-1884.7632,1.9765);
          return 1;
        }
        else
        {
          SendClientMessage(playerid,red,"Go To Your spawn point");
          return 1;
        }
       
}
It works but I Fail in making it SetPlayerPos If playerisinrangepoint ,1968.4852,-2207.1484,13.5469 And 2015.1097,1546.3257,10.9667 there too!!! Please help me cose i want /new to transport player to the Setplayerpos if player is in those 2 places i wrote above, else sendclientmessage go to your spawn point
THANKS!!
pawn Код:
if(strcmp(cmdtext, "/new") == 0)
{
    if(IsPlayerInRangeOfPoint(playerid, 9.0, 1958.3783,1343.1572,15.3746))
    {
        SetPlayerPos(playerid,3057.6040,-1884.7632,1.9765);
    }
    else
    SendClientMessage(playerid,red,"Go To Your spawn point");
    return 1;
}

thats how it should look you only should return 1;
at the end if cmd :]
tho u didn't need the else brackets^^
Reply
#9

Quote:
Originally Posted by James_Bauer
The easy way to learn how to make teleport command is go to wiki page i learn over there to without any help just be patient and you will learn
You surely didnt read my problem and


saiberfun thanks
you rox!
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)