14.09.2011, 20:24
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;
}