03.02.2012, 15:20
Hey, I'm trying to create an object for any player that is not admin level 5+ when he spawns and to delete it if he is (when he spawns), its the first time I'm using player objects and I really didn't know how this works, I tried to do this my way;
And I tried another way after searching online and it still didn't work;
It created the object if the player is not a level 5+ admin, but it does not destroy it when he spawns again as a level 5 administrator. HELP please.
Код HTML:
new hadalwall;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(PlayerInfo[i][pAdmin] < 5)
{
DestroyPlayerObject(i, hadalwall);
hadalwall = CreatePlayerObject(i,2395, 548.61, 2567.65, 348.70, 0.00, 270.00, 180.00);
}
else if(PlayerInfo[i][pAdmin] >= 5)
{
DestroyPlayerObject(i, hadalwall);
}
}
Код HTML:
new hadalwall[MAX_PLAYERS];
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(PlayerInfo[i][pAdmin] < 5)
{
DestroyPlayerObject(i, hadalwall[playerid]);
hadalwall[i] = CreatePlayerObject(i,2395, 548.61, 2567.65, 348.70, 0.00, 270.00, 180.00);
}
else if(PlayerInfo[i][pAdmin] >= 5)
{
DestroyPlayerObject(i, hadalwall[playerid]);
}
}