Help with /enter.
#2

Well I don't think factionid is a global variable. From what you are showing me here factionid is undefined in the CMDs. I don't really know the structure of your gamemode but I'm sure you need to add something like this:

pawn Код:
CMD:enter(playerid, params[])
{
   for(new factionid=0;factionid<MAX_FACTIONS;factionid++)
   {
       if(IsPlayerInRangeOfPoint(playerid, 5.0, FactionEntX[factionid], FactionEntY[factionid],FactionEntZ[factionid]))
       {
            SetPlayerPos(playerid, FactionIntX[factionid],FactionIntY[factionid],FactionIntZ[factionid]);
            SetPlayerInterior(playerid, FactionInt[factionid]);
            SetPlayerVirtualWorld(playerid, 0);
       }
   }
   return 1;
}

CMD:exit(playerid, params[])
{
   for(new factionid=0;factionid<MAX_FACTIONS;factionid++)
   {
        if(IsPlayerInRangeOfPoint(playerid, 5.0, FactionIntX[factionid],FactionIntY[factionid],FactionIntZ[factionid]))
        {
              SetPlayerPos(playerid, FactionEntX[factionid],FactionEntY[factionid],FactionEntZ[factionid]);
              SetPlayerVirtualWorld(playerid, 0);
              SetPlayerInterior(playerid,0);
        }
   }
   return 1;
}
Reply


Messages In This Thread
Help with /enter. - by Dokins - 14.09.2011, 19:48
Re: Help with /enter. - by scottyishere - 14.09.2011, 20:24
Re: Help with /enter. - by rt-2 - 14.09.2011, 20:28
Re: Help with /enter. - by Dokins - 14.09.2011, 20:31
Re: Help with /enter. - by scottyishere - 14.09.2011, 20:35
Re: Help with /enter. - by Dokins - 14.09.2011, 20:38
Re: Help with /enter. - by Dokins - 14.09.2011, 20:43
Re: Help with /enter. - by scottyishere - 14.09.2011, 20:47
Re: Help with /enter. - by Dokins - 14.09.2011, 20:49

Forum Jump:


Users browsing this thread: 1 Guest(s)