11.05.2018, 07:41
i this is what you're looking for. if not, give me more details
PHP код:
#include <a_samp>
new spawndelay[MAX_PLAYERS];
forward OneSecondUpdate();
public OnPlayerConnect(playerid){
spawndelay[playerid] = 0;
return 1;
}
public OnPlayerSpawn(playerid){
if(spawndelay[playerid] > 0){
SendClientMessage(playerid, 0xFF0000FF, "You spawned too fast!");
Kick(playerid);
}
spawndelay[playerid] = 10;
return 1;
}
public OnGameModeInit(){
SetTimer("OneSecondUpdate", 1000, 1);
return 1;
}
public OneSecondUpdate(){
for(new i; i < MAX_PLAYERS; i++){
spawndelay[i] -= 1;
}
}