Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <sscanf2>
- #include <zcmd>
- #if defined FILTERSCRIPT
- public OnFilterScriptInit()
- {
- print("SA-MP AFK Sistemi");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- #else
- #endif
- new bool:afk[MAX_PLAYERS];
- public OnPlayerConnect(playerid)
- {
- afk[playerid] = false;
- return 1;
- }
- CMD:afk(playerid, params[])
- {
- if(afk[playerid] == false)
- {
- new Float:health;
- GetPlayerHealth(playerid, health);
- if(health < 100) return SendClientMessage(playerid, -1, "{00FFDD}Hata: {999999}Afk moda geçebilmek için canınızın {00FFDD}100 {999999}olması lazım.");
- afk[playerid] = true;
- SetPlayerVirtualWorld(playerid, playerid);
- SetPlayerHealth(playerid, cellmax);
- SetPlayerInterior(playerid,1);
- SetPlayerPos(playerid,1403.6039,-20.7303,1000.9115);
- ResetPlayerWeapons(playerid);
- TogglePlayerControllable(playerid, 0);
- }
- else
- {
- SendClientMessage(playerid, -1, "{00FFDD}Hata: {999999}Zaten afk moddasın. Geri dönmek için {00FFDD}/back {999999}komutunu kullan!");
- }
- return 1;
- }
- CMD:back(playerid, params[])
- {
- if(afk[playerid] == true)
- {
- afk[playerid] = false;
- SetPlayerVirtualWorld(playerid, 1);
- SetPlayerInterior(playerid, 0);
- TogglePlayerControllable(playerid, 1);
- SetPlayerHealth(playerid, 100);
- SetPlayerArmour(playerid, 100);
- SetPlayerPos(playerid, -320.2194,1802.8173,42.7235);
- }
- else
- {
- SendClientMessage(playerid, -1, "{00FFDD}Hata: {999999}Komutu kullanabilmek için afk modda olmalısın.");
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment