Quote:
Originally Posted by JaTochNietDan
pawn Код:
public OnGameModeInit() { SetTimer("ExplodePlayer",60000,false); return 1; }
public ExplodePlayer() { new conn_ID[MAX_PLAYERS],count; for(new i; i < MAX_PLAYERS; i++) { if(!IsPlayerConnected(i)) continue; conn_ID[count] = i; count++; } if(count == 0) return 1; // No players were connected... new Float:x,Float:y,Float:z; GetPlayerPos(conn_ID[random(count)],x,y,z); CreateExplosion(x, y, z, 5, 20); // Player goes boom return 1; }
Maybe you can learn from that
Finding a random player to work with in the entire server is messy though, I can't think of another way to do it without looping through to make sure they're connected and build an array with the information in it.
|
hmm you seem beast. thanks and if its not too much to ask no one has helped me with... how can i restart the game mode when all players on a team (TEAM_HIDER 0) like when theres no more players on that team when its empty because when they die they are switched to another team. so how can i do this?