12.12.2010, 10:59
I'm making a dynamic entrance system, it spawns, saves fine, but at my /enter command, they all work until a server restart, and then the one i last made only works.
here is my /enter code.
here is my /enter code.
pawn Код:
for(new i = 0; i < sizeof(Entrances); i++)
{
if(IsPlayerInRangeOfPoint(playerid, 3, Entrances[i][tEntranceX], Entrances[i][tEntranceY], Entrances[i][tEntranceZ]))
{
if(Entrances[i][tFaction] == 0)
{
SetPlayerInterior(playerid,Entrances[i][tExitInt]);
SetPlayerPos(playerid,Entrances[i][tExitX],Entrances[i][tExitY],Entrances[i][tExitZ]);
PlayerInfo[playerid][pInt] = Entrances[i][tExitInt];
return 1;
}
if(Entrances[i][tFaction] == 1337 && PlayerInfo[playerid][pAdmin] > 0)
{
SetPlayerInterior(playerid,Entrances[i][tExitInt]);
SetPlayerPos(playerid,Entrances[i][tExitX],Entrances[i][tExitY],Entrances[i][tExitZ]);
PlayerInfo[playerid][pInt] = Entrances[i][tExitInt];
return 1;
}
if(Entrances[i][tFaction] == 100 && IsACop(playerid))
{
SetPlayerInterior(playerid,Entrances[i][tExitInt]);
SetPlayerPos(playerid,Entrances[i][tExitX],Entrances[i][tExitY],Entrances[i][tExitZ]);
PlayerInfo[playerid][pInt] = Entrances[i][tExitInt];
return 1;
}
if(Entrances[i][tFaction] == PlayerInfo[playerid][pMember])
{
if(Entrances[i][tFaction] == PlayerInfo[playerid][pLeader])
{
SetPlayerInterior(playerid,Entrances[i][tExitInt]);
SetPlayerPos(playerid,Entrances[i][tExitX],Entrances[i][tExitY],Entrances[i][tExitZ]);
PlayerInfo[playerid][pInt] = Entrances[i][tExitInt];
return 1;
}
}
}
}