Coding a gate [Errors/+rep]
#1

So I've been trying to code a gate for a gang in my server, all the info is in the pastebin.
http://pastebin.com/tuy1qBjR
+rep for anyone who helps.
Reply
#2

pawn Код:
CMD:rbmgateopen(playerid, params[]) {
if(playerVariables[playerid][pGroup] == 4)
{
    if (IsPlayerInRangeOfPoint(playerid, 5, 1013.40002441,-1542.09997559,16.10000038) && GetPlayerInterior(playerid) == 0)
   {
          MoveObject(RBMGate, 1013.40002441,-1542.09997559,16.10000038, 5);
          return 1;
   }
}
}
Hope it helps
Reply
#3

Quote:
Originally Posted by Daddy Yankee
Посмотреть сообщение
pawn Код:
CMD:rbmgateopen(playerid, params[]) {
if(playerVariables[playerid][pGroup] == 4)
{
    if (IsPlayerInRangeOfPoint(playerid, 5, 1013.40002441,-1542.09997559,16.10000038) && GetPlayerInterior(playerid) == 0)
   {
          MoveObject(RBMGate, 1013.40002441,-1542.09997559,16.10000038, 5);
          return 1;
   }
}
}
Hope it helps
Thanks so much, although I do get
C:\Users\Jack\Desktop\Server\vx-rp.pwn(5591) : warning 209: function "cmd_rbmgateopen" should return a value, line 5591 is
pawn Код:
CMD:rbmgateopen(playerid, params[]) {
if(playerVariables[playerid][pGroup] == 4)
{
    if (IsPlayerInRangeOfPoint(playerid, 5, 1013.40002441,-1542.09997559,16.10000038) && GetPlayerInterior(playerid) == 0)
   {
          MoveObject(RBMGate, 1013.40002441,-1542.09997559,16.10000038, 5);
          return 1;
   }
}
} //Error line
Reply
#4

Try putting another return 1; before that line
Reply
#5

Daddy Yankee, please post code that works.

This works.
pawn Код:
CMD:rbmgateopen(playerid, params[])
{
    if(playerVariables[playerid][pGroup] == 4)
    {
        if (IsPlayerInRangeOfPoint(playerid, 5, 1013.40002441,-1542.09997559,16.10000038) && GetPlayerInterior(playerid) == 0)
       {
              MoveObject(RBMGate, 1013.40002441,-1542.09997559,16.10000038, 5);
              return 1;
       }
    }
    return 1;
} //Error
Reply
#6

Sorry, but I'm a total n00b, where do I place it? Just before the very end #endif?
Reply
#7

Take the code from Vincent, it's exactly what I've said
Reply
#8

Help?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)