!Redie to spawn on Alive players
PHP Code:
Like if you type !redie multiple times, 1 out of like 15 chances you will actually spawn on an alive player but the rest of them you actually spawn in the spawn locations. Can someone help me fix the code. Could we actually somehow remove the spawn locations just for redie so they only spawn on currently alive players? Im not sure, just please comment and help out :D |
Re: !Redie to spawn on Alive players
You can't remove spawn location. When player spawns he WILL be spawned on proper spawn position of info_player_start(depends on the mod) entity. But you can teleport them immediately to another player. But if the player is in weird position, spawned player might stuck in the wall, floor or ceiling.
|
Re: !Redie to spawn on Alive players
Quote:
Could i grab a piece of code to implement into !redie |
Re: !Redie to spawn on Alive players
PHP Code:
|
Re: !Redie to spawn on Alive players
Still doesnt work.
|
Re: !Redie to spawn on Alive players
new players[MaxClients+1];
new count = 0; for(new i = 1; i 0){ decl Float:pos[3]; GetClientAbsOrigin(players[GetRandomInt(0, count-1)], pos); TeleportEntity(client, pos NULL_VECTOR, NULL_VECTOR); } fudge, tapatalk screwed this up... i will rewrite it later. |
Re: !Redie to spawn on Alive players
new players[MaxClients+1];
new count = 0; for(new i = 1; i <= MaxClients; i++){ if(IsClientInGame(i) && IsPlayerAlive(i)){ players[count] = i; count++; } } if(count > 0){ decl Float:pos[3]; GetClientAbsOrigin(players[GetRandomInt(0, count-1), pos); TeleportEntity(client, pos, NULL_VECTOR, NULL_VECTOR); } |
Re: !Redie to spawn on Alive players
it's missing a "]", i'm not modifying(or modifing, i dunno) it, as it might mess up again.
|
Re: !Redie to spawn on Alive players
Still pending on a new code, due to !redie teleports you to players AND start spawn locations
|
Re: !Redie to spawn on Alive players
it's not pending anything. it's working fine(with just a thing added):
Code:
public Action:Command_Redie(client, args) |
All times are GMT -4. The time now is 00:15. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.