02.12.2011, 15:23
Hi guys, small problem here. I got a capture the flag server in the making, ofc, shows the flag on the radar for 5 secs, and then hides. I want to make it so that after the 5 seconds is up, it only shows locally.
and
I didnt think i was THAT much of a noob, but this has completely defeated me. The icon doesnt show anywhere at all, any ideas?
-Aston
Код:
new Float:flagposx, Float:flagposy, Float:flagposz;
Код:
stock SpawnNewFlag() { DestroyObject(flag); new rflag = random(sizeof(FlagCoordinates)); flag = CreateObject(2993, FlagCoordinates[rflag][0], FlagCoordinates[rflag][1], FlagCoordinates[rflag][2]-1, 0, 0,0,0); flagposx = FlagCoordinates[rflag][0]; flagposy = FlagCoordinates[rflag][1]; flagposz = FlagCoordinates[rflag][2]; for(new i = 0; i < MAX_PLAYERS; i++) { SetPlayerMapIcon(i, 1, flagposx, flagposy, flagposz, 53, 0, MAPICON_GLOBAL); } SendClientMessageToAll(TURQUOISE, "[FLAG] The Flag has respawned. Showing flag for 5 seconds."); SetTimer("FlagHide", 5000, false); return 1; }
Код:
public FlagHide() { SendClientMessageToAll(TURQUOISE, "[FLAG] The flag has been hidden."); for(new i = 0; i < MAX_PLAYERS; i++) { RemovePlayerMapIcon(i, 1); RemovePlayerMapIcon(i, 3); GetObjectPos(flag, flagposx,flagposy,flagposz); SetPlayerMapIcon(i, 2, flagposx, flagposy, flagposz, 53, 0, MAPICON_LOCAL); } return 1; }
-Aston