Megírom neked és editelem ezt.
#include <a_samp>#include <zcmd>#include <sscanf2>public OnFilterScriptInit(){SetTimer(\"korido\", 300000, false); // a köridõ itt 5 percreturn 1;}forward korido(playerid);public korido(playerid){SpawnPlayer(playerid);}public OnPlayerDeath(playerid, killerid, reason){SetTimer(\"halaltimer\", 300000, false);SendClientMessage(playerid, -1, \"Meghaltál! Válaszd ki kit szeretnél nézni!/spec [iD] \");return 1;}forward halaltimer(playerid);public halaltimer(playerid){return 1;}CMD:spec(playerid, params[]){new ID;if(sscanf(params, \"u\", ID)) return SendClientMessage(playerid, -1, \"Használat: /spec [iD/Név] !\");if(ID == playerid) return SendClientMessage(playerid, -1, \"Magadat nem specelheted!\");if(ID == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1, \"Rossz ID/Név!\");TogglePlayerSpectating(playerid, 1);PlayerSpectatePlayer(playerid, ID);return 1;}
#include <a_samp>#include <zcmd>#include <sscanf2>public OnFilterScriptInit(){SetTimer(\"korido\", 300000, false); // a köridõ itt 5 percreturn 1;}forward korido(playerid);public korido(playerid){SpawnPlayer(playerid);}public OnPlayerDeath(playerid, killerid, reason){SetTimer(\"halaltimer\", 300000, false);SendClientMessage(playerid, -1, \"Meghaltál! Válaszd ki kit szeretnél nézni!/spec [iD] \");return 1;}forward halaltimer(playerid);public halaltimer(playerid){return 1;}CMD:spec(playerid, params[]){new ID;if(sscanf(params, \"u\", ID)) return SendClientMessage(playerid, -1, \"Használat: /spec [iD/Név] !\");if(ID == playerid) return SendClientMessage(playerid, -1, \"Magadat nem specelheted!\");if(ID == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1, \"Rossz ID/Név!\");TogglePlayerSpectating(playerid, 1);PlayerSpectatePlayer(playerid, ID);return 1;} Elméletileg jó kell, hogy legyen. A random player specelést nem tudtam megcsinálni, mivel nem vagyok otthon a for ciklus használatában. Remélem így is megfelelõ!
#include <a_samp>#include <zcmd>#include <sscanf2>public OnFilterScriptInit(){SetTimer(\"korido\", 300000, false); // a köridõ itt 5 percreturn 1;}forward korido(playerid);public korido(playerid){SpawnPlayer(playerid);}public OnPlayerDeath(playerid, killerid, reason){SetTimer(\"halaltimer\", 300000, false);SendClientMessage(playerid, -1, \"Meghaltál! Válaszd ki kit szeretnél nézni!/spec [iD] \");return 1;}forward halaltimer(playerid);public halaltimer(playerid){return 1;}CMD:spec(playerid, params[]){new ID;if(sscanf(params, \"u\", ID)) return SendClientMessage(playerid, -1, \"Használat: /spec [iD/Név] !\");if(ID == playerid) return SendClientMessage(playerid, -1, \"Magadat nem specelheted!\");if(ID == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1, \"Rossz ID/Név!\");TogglePlayerSpectating(playerid, 1);PlayerSpectatePlayer(playerid, random_player());return 1;}stock random_player(){new random_player_online_count = 0;for(new inx; inx < GetMaxPlayers(); inx++){if(IsPlayerConnected(inx)){ random_player_online_count++;}}if(random_player_online_count == 0) return INVALID_PLAYER_ID;new give_me_the_random_player_id = random(count);return give_me_the_random_player_id;}
#include <a_samp>#include <zcmd>#include <sscanf2>public OnFilterScriptInit(){SetTimer(\"korido\", 300000, false); // a köridõ itt 5 percreturn 1;}forward korido(playerid);public korido(playerid){SpawnPlayer(playerid);}public OnPlayerDeath(playerid, killerid, reason){SetTimer(\"halaltimer\", 300000, false);SendClientMessage(playerid, -1, \"Meghaltál! Válaszd ki kit szeretnél nézni!/spec [iD] \");return 1;}forward halaltimer(playerid);public halaltimer(playerid){return 1;}CMD:spec(playerid, params[]){new ID;if(sscanf(params, \"u\", ID)) return SendClientMessage(playerid, -1, \"Használat: /spec [iD/Név] !\");if(ID == playerid) return SendClientMessage(playerid, -1, \"Magadat nem specelheted!\");if(ID == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1, \"Rossz ID/Név!\");TogglePlayerSpectating(playerid, 1);PlayerSpectatePlayer(playerid, random_player());return 1;}stock random_player(){new random_player_online_count = 0;for(new inx; inx < GetMaxPlayers(); inx++){if(IsPlayerConnected(inx)){ random_player_online_count++;}}if(random_player_online_count == 0) return INVALID_PLAYER_ID;new give_me_the_random_player_id = random(count);return give_me_the_random_player_id;} Segítséget Cheese nevû embertõl kaptam