Jump to content

S1meD

Membru
  • Posts

    129
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by S1meD

  1. Deci stai sa inteleg, joci de o luna sa-mp si deja vrei sa-ti deschizi server etc? Cred ca nimeni nu va vrea sa faca parteneriat cu tine.
  2. Cum as putea sa fac ca sa copilez in notepad++? Adica eu scriptam in Notepad++ apoi intram in pawno inportam Gm-ul si dupa il copilam. Este vreo metoda mai usoara?
  3. Salutare dragi utilizatori a site-ului SA-MP.R, am venit cu o intrebare la voi deoarece nu stiu ce sa fac. Care program de scriptat e mai usor de utilizat si bun? Va intreb deoarece uni folosesc Notepad++ alti Pawno alti PawnoPlus. Multumesc de atentie.
  4. Ai mare dreptate draga KnowN
  5. Din cate stiu acest GM are doar cateva componente. Descarca de pe net incudurile si verifica daca ai incarcat baza de date cu numele w3op.
  6. Salut. Am si eu o mica problema care nu-i dau de cat... defapt e o intrebare... cum se masoara distanta de ex: de unde esti tu pina la un anumit punct? Daca stie cineva va rog lasati reply.
  7. @WopsS Dar e posibil sa facem checkpoint-uri verzi, albastre etc?
  8. La multi ani. WopsS esti tare nu te lasa de scripting si iti doresc ca toate zisele sa se transforme in realitate.
  9. Ce-i asa greu? Te duci unde ai baza de date si faci o noua linie la users si o denumesi Ppoints
  10. @EquiNox Fac conexiunea tot si cand intru pe server imi da crash dece?
  11. Doresti comanda [/setadmin] prin ZCMD?
  12. @@Ath9 un GM bunicel, daca lucrezi 2-3 ore in el si repari baza de date sa se salveze tot e bunicel. Eu unul nu-l voi folosi niciodata si recomand tuturor incepatorilor sa nu isi ia un Gm de pe net care e complicat dar de inceput recomand un GM de la 0 asta va va ajuta sa evoluati foarte mult.
  13. Pai macar da-mi poziti masinilor din DS pretul si Stock-ul ca pe astea nu le stiu ca pe restu le fac eu in 3-4 minue.
  14. @Ath9 baza de date e praf rau si prima si a doua, da-mi baza de date buna asta care mi-ai dato e buguita nu se salveaza toate datele pretul la masini e stricat, nu e turfs in LV nu se salveaza sistemul de clan, casele si bizurile is pune gresit . Da-mi baza de date buna.
  15. Ne dai baza de date buna?
  16. Hm ne dai baza de date originala? Ca asta e buguita.
  17. Uitete la OnPlayerEnterCheckpoint si ai acolo tot.
  18. Cauta in GM EsteManager si ppune numele tau acolo si gata.
  19. 10/10 Pentru GM, 0/10 pentru ca lai postat. Orcum felicitari chear daca nu-l voi folosi niciodata cum a zis si @RaZoR23 Lasa oameni sa si faca GM-ul lor.
  20. Din cate ai zis mai sus imi dau seama ca ai GM-ul Saints-Network, sistemul de clanuri la GM-ul saints e buguit tot. Nimeni no sa pearda 1-2 ore sa-ti faca tie sistemul. PS: format(string,sizeof(string),"UPDATE users SET `name`='%s' WHERE `name`='%s'",name,name2); mysql_query(SQL,string);Sterge asta de la [/makeclan] si nu o sa se mai schimbe numele o sa te conectezi cu acelas nume.
  21. In server.cfg ai pus pluginurile .so? De ex ar trebui sa le pui plugins mysql.so streamer.so ....
  22. S1meD

    Problema pCash

    Uitete la OnPlayerDisConnect poate nu se salveaza bani dupa esirea playerilor.
  23. Cer T/C o sa refac comenzile alea si o sa le refac pe zcmd, mersi orcum.
  24. WTF eu credeam ca trebuie modificata toata comanda ca sa o treci pe zcmd.....
  25. Problema intalnita (descriere):Pai nu pot sa trec vreo 10 comenzi de pe dini pe zcmd.Ero(area / rile) / warning-(ul / urile):N-am.Liniile de cod / sursa / script-ul(obligatoriu): public OnPlayerCommandText(playerid, cmdtext[]) { new cmd[256], idx, string[256]; cmd = strtok(cmdtext, idx); new pName[MAX_PLAYER_NAME]; new targetid; new pNameGive[MAX_PLAYER_NAME]; new Float:x, Float:y, Float:z; // General Commands if(strcmp(cmd, "/help", true) == 0) { if(IsPlayerConnected(playerid)) { if(gLogged[playerid] == 1) { SendClientMessage(playerid, COLOR_WHITE, "*** ACCOUNT *** /stats"); SendClientMessage(playerid, COLOR_WHITE, "*** CHAT *** -"); SendClientMessage(playerid, COLOR_WHITE, "*** GENERAL *** /report /helpme"); } else { SendClientMessage(playerid, COLOR_ERROR, "You are not logged in!"); } } return 1; } if(strcmp(cmd, "/stats", true) == 0) { if(IsPlayerConnected(playerid)) { GetPlayerName(playerid, pName, sizeof(pName)); if(gLogged[playerid] == 1) { ShowStats(playerid, playerid); } else { SendClientMessage(playerid, COLOR_ERROR, "You are not logged in!"); } } return 1; } if(strcmp(cmd, "/report", true) == 0) { if(IsPlayerConnected(playerid)) { if(gLogged[playerid] == 1) { GetPlayerName(playerid, pName, sizeof(pName)); new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= ' ')) { idx++; } new offset = idx; new result[128]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } result[idx - offset] = EOS; if(!strlen(result)) { SendClientMessage(playerid, COLOR_SYN, "Synthax: /report <text>"); return 1; } if(ReportTime[playerid] == 0) { format(string, sizeof(string), "Report from %s (ID:%d): %s", pName, playerid, result); AdminsBroadCast(COLOR_LIGHTRED2, string); SendClientMessage(playerid, COLOR_YELLOW2, "Your report got sent to the administrator!"); ReportTime[playerid] = 10; SetTimerEx("ReportTimer", 10000, false, "i", playerid); } else { format(string, sizeof(string), "You need to wait %d seconds before send another report.", ReportTime[playerid]); SendClientMessage(playerid, COLOR_YELLOW2, string); } } else { SendClientMessage(playerid, COLOR_ERROR, "You are not logged in!"); } } return 1; } if(strcmp(cmd, "/helpme", true) == 0) { if(IsPlayerConnected(playerid)) { if(gLogged[playerid] == 1) { GetPlayerName(playerid, pName, sizeof(pName)); new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= ' ')) { idx++; } new offset = idx; new result[128]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } result[idx - offset] = EOS; if(!strlen(result)) { SendClientMessage(playerid, COLOR_SYN, "Synthax: /helpme <text>"); return 1; } if(ReportTime[playerid] == 0) { format(string, sizeof(string), "Report from %s (ID:%d): %s", pName, playerid, result); AdminsBroadCast(COLOR_LIGHTRED2, string); SendClientMessage(playerid, COLOR_YELLOW2, "Your help request got sent to the helpers!"); ReportTime[playerid] = 10; SetTimerEx("ReportTimer", 10000, false, "i", playerid); } else { format(string, sizeof(string), "You need to wait %d seconds before request another help.", ReportTime[playerid]); SendClientMessage(playerid, COLOR_YELLOW2, string); } } else { SendClientMessage(playerid, COLOR_ERROR, "You are not logged in!"); } } return 1; } // // Admin Commands if(strcmp(cmd, "/ah", true) == 0 || strcmp(cmd, "/adminhelp", true) == 0) { if(IsPlayerConnected(playerid)) { if(gLogged[playerid] == 1) { if(PlayerInfo[playerid][pAdmin] >= 1) { SendClientMessage(playerid, COLOR_GREEN, "_______________________________________"); if(PlayerInfo[playerid][pAdmin] >= 1) { SendClientMessage(playerid, COLOR_WHITE, "** Admin level 1 ** (/ah)dminhelp (/a)dmin /goto /gethere /respawn /ban /kick (/checkw)eapons /check /spec (/rcon)"); } if(PlayerInfo[playerid][pAdmin] >= 2) { SendClientMessage(playerid, COLOR_WHITE, "** Admin level 2 ** (/bano)ffline**"); } if(PlayerInfo[playerid][pAdmin] >= 3) { SendClientMessage(playerid, COLOR_WHITE, "** Admin level 3 **"); } if(PlayerInfo[playerid][pAdmin] >= 4) { SendClientMessage(playerid, COLOR_WHITE, "** Admin level 4 **"); } if(PlayerInfo[playerid][pAdmin] >= 5) { SendClientMessage(playerid, COLOR_WHITE, "** Admin level 5 **"); } if(PlayerInfo[playerid][pAdmin] >= 6) { SendClientMessage(playerid, COLOR_WHITE, "** Admin level 6 ** /makeadmin /makehelper /makeleader /auninvite"); } SendClientMessage(playerid, COLOR_GREEN, "_______________________________________"); } else if(PlayerInfo[playerid][pAdmin] < 1) { SendClientMessage(playerid, COLOR_ERROR, "Error: Your admin level is not high enough to use this command."); } } else { SendClientMessage(playerid, COLOR_ERROR, "You are not logged in!"); } } return 1; } if(strcmp(cmd, "/a", true) == 0 || strcmp(cmd, "/adminchat", true) == 0) { if(IsPlayerConnected(playerid)) { if(gLogged[playerid] == 1) { GetPlayerName(playerid, pName, sizeof(pName)); new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= ' ')) { idx++; } new offset = idx; new result[128]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } result[idx - offset] = EOS; if(!strlen(result)) { SendClientMessage(playerid, COLOR_SYN, "Synthax: (/a)dminchat <text>"); return 1; } if (PlayerInfo[playerid][pAdmin] >= 1 && PlayerInfo[playerid][pAdmin] <= 5) { format(string, sizeof(string), "** Admin Level %d %s : %s **", PlayerInfo[playerid][pAdmin], pName, result); AdminsBroadCast(COLOR_YELLOW2, string); } if (PlayerInfo[playerid][pAdmin] == 6) { format(string, sizeof(string), "{CFAE70}** Admin Level %d %s : %s **", PlayerInfo[playerid][pAdmin], pName, result); AdminsBroadCast(COLOR_WHITE, string); } if (PlayerInfo[playerid][pAdmin] < 1) { SendClientMessage(playerid, COLOR_ERROR, "Error: Your admin level is not high enough to use this command."); return 1; } } else { SendClientMessage(playerid, COLOR_ERROR, "You are not logged in!"); } } return 1; } if(strcmp(cmd, "/ban", true) == 0) { if(IsPlayerConnected(playerid)) { if(gLogged[playerid] == 1) { GetPlayerName(playerid, pName, sizeof(pName)); temp = strtok(cmdtext, idx); if(!strlen(temp)) { SendClientMessage(playerid, COLOR_SYN, "Synthax: /ban <playerid/PartOfName> <reason>"); return 1; } targetid = ReturnUser(temp); if (PlayerInfo[playerid][pAdmin] >= 1) { if(IsPlayerConnected(targetid)) { if(targetid != INVALID_PLAYER_ID) { GetPlayerName(targetid, pNameGive, sizeof(pNameGive)); new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= ' ')) { idx++; } new offset = idx; new result[128]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } result[idx - offset] = EOS; if(!strlen(result)) { SendClientMessage(playerid, COLOR_SYN, "Synthax: /ban <playerid/PartOfName> <reason>"); return 1; } if(PlayerInfo[targetid][pAdmin] > 0 && PlayerInfo[playerid][pAdmin] < 6) { SendClientMessage(playerid, COLOR_ERROR, "AdmWarning: You can't ban admins!"); format(string, sizeof(string), "AdmCmd: %s tried to ban admin %s with the reason: %s", pName, pNameGive, (result)); AdminsBroadCast(COLOR_LIGHTRED, string); return 1; } format(string, sizeof(string), "AdmCmd: %s was banned by %s, reason: %s", pNameGive, pName, (result)); SendClientMessageToAll(COLOR_LIGHTRED, string); PlayerInfo[targetid][pBanned] = 1; Update(targetid, pBannedu); new pGiveIP[256]; GetPlayerIp(targetid, pGiveIP, sizeof(pGiveIP)); strmid(PlayerInfo[targetid][pIP], pGiveIP, 0, 100, 255); Update(targetid, pIPu); new query[512]; mysql_format(handle, query, sizeof(query) ,"INSERT INTO `banslogs` (`ID`,`username`,`IP`,`Admin`,`Reason`,`Type`,`Date`,`Time`) VALUES ('','%e','%e','%e','%e','%e',CURRENT_TIMESTAMP,'%d')", pNameGive, PlayerInfo[targetid][pIP], pName, result, "Online", 0); mysql_query(handle, query); Kick(targetid); return 1; } } else { SendClientMessage(playerid, COLOR_ERROR, "Error: Invalid playerid / playername."); } } else { SendClientMessage(playerid, COLOR_ERROR, "Error: Your admin level is not high enough to use this command."); } } else { SendClientMessage(playerid, COLOR_ERROR, "You are not logged in!"); } } return 1; } if(strcmp(cmd, "/bano", true) == 0 || strcmp(cmd, "/banoffline", true) == 0) { if(IsPlayerConnected(playerid)) { if(gLogged[playerid] == 1) { cache_get_data(rows, fields, handle); new query[512]; mysql_format(handle, query, sizeof(query), "SELECT `username` FROM `players` WHERE `username` = '%e' AND `Banned` = '0' LIMIT 0", temp); mysql_query(handle, query); GetPlayerName(playerid, pName, sizeof(pName)); temp = strtok(cmdtext, idx); if(!strlen(temp)) { SendClientMessage(playerid, COLOR_SYN, "Synthax: (/bano)ffline <playername> <reason>"); return 1; } if (PlayerInfo[playerid][pAdmin] >= 2) { if(!rows) { format(string, sizeof(string), "Error: Nobody with the name %s is registered or this player is alredy banned."); return SendClientMessage(playerid, COLOR_ERROR, string); } else if(rows) { GetPlayerName(targetid, pNameGive, sizeof(pNameGive)); new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= ' ')) { idx++; } new offset = idx; new result[128]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } result[idx - offset] = EOS; if(!strlen(result)) { SendClientMessage(playerid, COLOR_SYN, "Synthax: (/bano)ffline <playername> <reason>"); return 1; } if(PlayerInfo[targetid][pAdmin] > 0 && PlayerInfo[playerid][pAdmin] < 6) { SendClientMessage(playerid, COLOR_ERROR, "AdmWarning: You can't ban admins!"); format(string, sizeof(string), "AdmCmd: %s tried to ban admin %s with the reason: %s", pName, pNameGive, (result)); AdminsBroadCast(COLOR_LIGHTRED, string); return 1; } format(string, sizeof(string), "AdmCmd: %s was banned offline by %s, reason: %s", temp, pName, (result)); SendClientMessageToAll(COLOR_LIGHTRED, string); mysql_format(handle, query, sizeof(query), "UPDATE `players` SET `Banned` = '1' WHERE username = '%e'", temp); mysql_query(handle, query); mysql_format(handle, query, sizeof(query) ,"INSERT INTO `banslogs` (`ID`,`username`,`IP`,`Admin`,`Reason`,`Type`,`Date`,`Time`) VALUES ('','%e','%e','%e','%e','%e',CURRENT_TIMESTAMP,'%d')", temp, PlayerInfo[targetid][pIP], pName, result, "Offline", 0); mysql_query(handle, query); new pGiveIP[256]; GetPlayerIp(targetid, pGiveIP, sizeof(pGiveIP)); strmid(PlayerInfo[targetid][pIP], pGiveIP, 0, 100, 255); return 1; } } else { SendClientMessage(playerid, COLOR_ERROR, "Error: Your admin level is not high enough to use this command."); } } else { SendClientMessage(playerid, COLOR_ERROR, "You are not logged in!"); } } return 1; } if(strcmp(cmd, "/kick", true) == 0) { if(IsPlayerConnected(playerid)) { if(gLogged[playerid] == 1) { temp = strtok(cmdtext, idx); if(!strlen(temp)) { SendClientMessage(playerid, COLOR_SYN, "Synthax: /kick <playerid/PartOfName> <reason>"); return 1; } targetid = ReturnUser(temp); if (PlayerInfo[playerid][pAdmin] >= 1) { if(IsPlayerConnected(targetid)) { if(targetid != INVALID_PLAYER_ID) { GetPlayerName(targetid, pNameGive, sizeof(pNameGive)); GetPlayerName(playerid, pName, sizeof(pName)); new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= ' ')) { idx++; } new offset = idx; new result[128]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } result[idx - offset] = EOS; if(!strlen(result)) { SendClientMessage(playerid, COLOR_SYN, "Synthax: /kick <playerid/PartOfName> <reason>"); return 1; } if (PlayerInfo[targetid][pAdmin] > PlayerInfo[playerid][pAdmin]) { SendClientMessage(playerid, COLOR_ERROR, "Error: You cannot kick an administrator higher than your level."); return 1; } format(string, sizeof(string), "AdmCmd: %s got kicked by %s, reason: %s", pNameGive, pName, (result)); SendClientMessageToAll(COLOR_LIGHTRED, string); new query[512]; mysql_format(handle, query, sizeof(query) ,"INSERT INTO `kickslogs` (`ID`,`username`,`IP`,`Admin`,`Reason`,`Date`) VALUES ('','%e','%e','%e','%e',CURRENT_TIMESTAMP)", pNameGive, PlayerInfo[targetid][pIP], pName, result); mysql_query(handle, query); Kick(targetid); return 1; } } else { SendClientMessage(playerid, COLOR_ERROR, "Error: Invalid playerid / playername."); } } else { SendClientMessage(playerid, COLOR_ERROR, "Error: Your admin level is not high enough to use this command."); } } else { SendClientMessage(playerid, COLOR_ERROR, "You are not logged in!"); } } return 1; } if(strcmp(cmd, "/makeadmin", true) == 0) { if(IsPlayerConnected(playerid)) { if(gLogged[playerid] == 1) { temp = strtok(cmdtext, idx); if(!strlen(temp)) { SendClientMessage(playerid, COLOR_SYN, "Synthax: /makeadmin <playerid/PartOfName> <admin level (1-6)>"); return 1; } new adminlevel; targetid = ReturnUser(temp); temp = strtok(cmdtext, idx); adminlevel = strval(temp); GetPlayerName(targetid, pName, sizeof(pName)); GetPlayerName(targetid, pNameGive, sizeof(pNameGive)); if(adminlevel >= 0 && adminlevel <= 6) {} else return 1; if (PlayerInfo[playerid][pAdmin] == 6 || IsPlayerAdmin(playerid)) { if(IsPlayerConnected(targetid)) { if(targetid != INVALID_PLAYER_ID) { GetPlayerName(targetid, pNameGive, sizeof(pNameGive)); PlayerInfo[targetid][pAdmin] = adminlevel; Update(targetid, pAdminu); printf("AdmCmd: %s has promoted %s to a level %d admin.", pName, pNameGive, adminlevel); format(string, sizeof(string), "You have been promoted to a level %d admin by %s", adminlevel, pName); SendClientMessage(targetid, COLOR_LIGHTRED2, string); format(string, sizeof(string), "You have promoted %s to a level %d admin.", pNameGive, adminlevel); SendClientMessage(playerid, COLOR_LIGHTRED2, string); } } else { SendClientMessage(playerid, COLOR_ERROR, "Error: Invalid playerid / playername."); } } else { SendClientMessage(playerid, COLOR_ERROR, "Error: Your admin level is not high enough to use this command."); } } else { SendClientMessage(playerid, COLOR_ERROR, "You are not logged in!"); } } return 1; } if(strcmp(cmd, "/makehelper", true) == 0) { if(IsPlayerConnected(playerid)) { if(gLogged[playerid] == 1) { temp = strtok(cmdtext, idx); if(!strlen(temp)) { SendClientMessage(playerid, COLOR_SYN, "Synthax: /makehelper <playerid/PartOfName> <helper level (1-6) >"); return 1; } new helperlevel; targetid = ReturnUser(temp); temp = strtok(cmdtext, idx); helperlevel = strval(temp); if(helperlevel >= 0 && helperlevel <= 6) {} else return 1; if (PlayerInfo[playerid][pAdmin] == 6 || IsPlayerAdmin(playerid)) { if(IsPlayerConnected(targetid)) { if(targetid != INVALID_PLAYER_ID) { GetPlayerName(targetid, pNameGive, sizeof(pNameGive)); PlayerInfo[targetid][pHelper] = helperlevel; Update(targetid, pHelperu); printf("AdmCmd: %s has promoted %s to a level %d admin.", pName, pNameGive, helperlevel); format(string, sizeof(string), "You have been promoted to a level %d helper by %s", helperlevel, pName); SendClientMessage(targetid, COLOR_LIGHTRED2, string); format(string, sizeof(string), "You have promoted %s to a level %d helper.", pNameGive, helperlevel); SendClientMessage(playerid, COLOR_LIGHTRED2, string); } } else { SendClientMessage(playerid, COLOR_ERROR, "Error: Invalid playerid / playername."); } } else { SendClientMessage(playerid, COLOR_ERROR, "Error: Your admin level is not high enough to use this command."); } } else { SendClientMessage(playerid, COLOR_ERROR, "You are not logged in!"); } } return 1; } if(strcmp(cmd, "/makeleader", true) == 0) { if(IsPlayerConnected(playerid)) { if(gLogged[playerid] == 1) { temp = strtok(cmdtext, idx); if(!strlen(temp)) { SendClientMessage(playerid, COLOR_SYN, "Synthax: /makeleader <playerid/PartOfName> <Faction Number (1-6) >"); return 1; } new factionid; targetid = ReturnUser(temp); temp = strtok(cmdtext, idx); factionid = strval(temp); if(factionid < 1 || factionid > 6) { SendClientMessage(playerid, COLOR_ERROR, "Faction ID can't be lower than 1 or bigger than 6!"); return 1; } if (PlayerInfo[playerid][pAdmin] == 6) { if(IsPlayerConnected(targetid)) { if(targetid != INVALID_PLAYER_ID) { GetPlayerName(targetid, pNameGive, sizeof(pNameGive)); PlayerInfo[targetid][pLeader] = factionid; PlayerInfo[targetid][pMember] = factionid; Update(targetid, pLeaderu); Update(targetid, pMemberu); format(string, sizeof(string), "You got promoted to the rank of a faction leader by %s", pName); SendClientMessage(targetid, COLOR_LIGHTRED2, string); format(string, sizeof(string), "%s is now the leader of faction id %d.", pNameGive, factionid); SendClientMessage(playerid, COLOR_LIGHTRED2, string); if(factionid == 1) { PlayerInfo[targetid][pSkin] = 265; PlayerInfo[targetid][pRank] = 6; PlayerInfo[targetid][pRank] = 6; Update(targetid, pRanku); SetPlayerSkin(targetid, PlayerInfo[targetid][pSkin]); Update(targetid, pSkinu); return 1; } else if(factionid == 2) { PlayerInfo[targetid][pSkin] = 265; PlayerInfo[targetid][pRank] = 6; PlayerInfo[targetid][pRank] = 6; Update(targetid, pRanku); SetPlayerSkin(targetid, PlayerInfo[targetid][pSkin]); Update(targetid, pSkinu); } else if(factionid == 3) { PlayerInfo[targetid][pSkin] = 265; PlayerInfo[targetid][pRank] = 6; PlayerInfo[targetid][pRank] = 6; Update(targetid, pRanku); SetPlayerSkin(targetid, PlayerInfo[targetid][pSkin]); Update(targetid, pSkinu); } else if(factionid == 4) { PlayerInfo[targetid][pSkin] = 295; PlayerInfo[targetid][pRank] = 6; PlayerInfo[targetid][pRank] = 6; Update(targetid, pRanku); SetPlayerSkin(targetid, PlayerInfo[targetid][pSkin]); Update(targetid, pSkinu); } else if(factionid == 5) { PlayerInfo[targetid][pSkin] = 287; PlayerInfo[targetid][pRank] = 6; PlayerInfo[targetid][pRank] = 6; Update(targetid, pRanku); SetPlayerSkin(targetid, PlayerInfo[targetid][pSkin]); Update(targetid, pSkinu); } else if(factionid == 6) { PlayerInfo[targetid][pSkin] = 228; PlayerInfo[targetid][pRank] = 6; PlayerInfo[targetid][pRank] = 6; Update(targetid, pRanku); SetPlayerSkin(targetid, PlayerInfo[targetid][pSkin]); Update(targetid, pSkinu); } } } else { SendClientMessage(playerid, COLOR_ERROR, "Error: Invalid playerid / playername."); } } else { SendClientMessage(playerid, COLOR_ERROR, "Error: Your admin level is not high enough to use this command."); } } else { SendClientMessage(playerid, COLOR_ERROR, "You are not logged in!"); } } return 1; } if(strcmp(cmd, "/auninvite", true) == 0) { if(IsPlayerConnected(playerid)) { if(gLogged[playerid] == 1) { temp = strtok(cmdtext, idx); targetid = ReturnUser(temp); if(!strlen(temp)) { SendClientMessage(playerid, COLOR_SYN, "Synthax: /auninvite <playerid/PartOfName>"); return 1; } if (PlayerInfo[playerid][pAdmin] == 6) { if(IsPlayerConnected(targetid)) { if(targetid != INVALID_PLAYER_ID) { GetPlayerName(targetid, pNameGive, sizeof(pNameGive)); format(string, sizeof(string), "* You were FactionPKed by Admin %s, you are kicked out of your faction.", pName); SendClientMessage(targetid, COLOR_LIGHTRED, string); SendClientMessage(targetid, COLOR_LIGHTBLUE, "* You're a civilian now."); PlayerInfo[targetid][pLeader] = 0; Update(targetid, pLeaderu); PlayerInfo[targetid][pMember] = 0; Update(targetid, pMemberu); PlayerInfo[targetid][pRank] = 0; Update(targetid, pRanku); PlayerInfo[targetid][pSkin] = 250; SetPlayerSkin(targetid, PlayerInfo[targetid][pSkin]); Update(targetid, pSkinu); SetPlayerFactionColor(playerid); SetSpawnInfo(playerid, 0, 0, 1742.9515, -1862.3721, 13.5764, 359.5591, 0, 0, 0, 0, 0, 0); SetPlayerInterior(playerid, 0); SpawnPlayer(targetid); } } else { SendClientMessage(playerid, COLOR_ERROR, "Error: Invalid playerid / playername."); } } else { SendClientMessage(playerid, COLOR_ERROR, "Error: Your admin level is not high enough to use this command."); } } else { SendClientMessage(playerid, COLOR_ERROR, "You are not logged in!"); } } return 1; } if(strcmp(cmd, "/respawn", true) ==0) { if(IsPlayerConnected(playerid)) { if(gLogged[playerid] == 1) { temp = strtok(cmdtext, idx); if(!strlen(temp)) { SendClientMessage(playerid, COLOR_SYN, "Synthax: /respawn <playerid/PartOfName>"); return 1; } targetid = ReturnUser(temp); if(PlayerInfo[playerid][pAdmin] >= 1) { if(IsPlayerConnected(targetid)) { GetPlayerName(playerid, pName, sizeof(pName)); GetPlayerName(targetid, pNameGive, sizeof(pNameGive)); if(targetid != INVALID_PLAYER_ID) { format(string, sizeof(string), "AdmWarning: %s respawned %s.", pName, pNameGive); AdminsBroadCast(COLOR_LIGHTRED, string); format(string, sizeof(string), "AdmCmd: %s respawned you.", pName); SendClientMessage(targetid, COLOR_LIGHTRED, string); SetPlayerInterior(playerid, 0); SpawnPlayer(targetid); } } else { SendClientMessage(playerid, COLOR_ERROR, "Error: Invalid playerid / playername."); } } else { SendClientMessage(playerid, COLOR_ERROR, "Error: Your admin level is not high enough to use this command."); } } else { SendClientMessage(playerid, COLOR_ERROR, "You are not logged in!"); } } return 1; } if(strcmp(cmd, "/checkweapons", true) == 0 || strcmp(cmd, "/checkw", true) == 0) { if(IsPlayerConnected(playerid)) { if(gLogged[playerid] == 1) { if (PlayerInfo[playerid][pAdmin] < 1) { SendClientMessage(playerid, COLOR_ERROR, "You are not authorized"); return 1; } temp = strtok(cmdtext,idx); if (!strlen(temp)) { SendClientMessage(playerid, COLOR_SYN, "Synthax: /checkweapons <playerid/partOfName>"); return 1; } targetid = ReturnUser(temp); if (targetid == INVALID_PLAYER_ID) { SendClientMessage(playerid, COLOR_ERROR, "That player is offline"); return 1; } new weaponsmodel, ammunition; GetPlayerName(targetid, pNameGive, sizeof(pNameGive)); format(string, sizeof(string), "%s has the following weapons:", pNameGive); SendClientMessage(playerid, COLOR_ADMIN_INFO, string); for (new i=0; i<9; i++) { GetPlayerWeaponData(targetid, i, weaponsmodel, ammunition); if(weaponsmodel != 0) { format(string, sizeof(string), "%d: %d (%d)", i, weaponsmodel, ammunition); SendClientMessage(playerid, COLOR_ADMIN_INFO, string); } } } } return 1; } if(strcmp(cmd, "/spec", true) == 0 || strcmp(cmd, "/recon", true) == 0) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pAdmin] < 1) { SendClientMessage(playerid, COLOR_ERROR, "You are not authorized to use that command."); return 1; } temp = strtok(cmdtext, idx); if(!strlen(temp)) { SendClientMessage(playerid, COLOR_SYN, "Synthax: /spec [playerid/off]"); return 1; } targetid = ReturnUser(temp); if(IsPlayerNPC(targetid)) return 1; if(strcmp("off", temp, true, strlen(temp)) == 0) { if(GetPlayerState(playerid) != PLAYER_STATE_SPECTATING) { SendClientMessage(playerid, COLOR_ADMIN_INFO, "You are not spectating anyone"); return 1; } SetPlayerInterior(playerid, PlayerInfo[playerid][pInterior]); SendClientMessage(playerid, COLOR_ADMIN_INFO, "You are no longer spectating."); TogglePlayerSpectating(playerid, 0); SpectatedID[playerid] = INVALID_PLAYER_ID; SpectateType[playerid] = ADMIN_SPEC_TYPE_NONE; return 1; } if(IsPlayerConnected(targetid)) { if(GetPlayerState(playerid) != PLAYER_STATE_SPECTATING) { PlayerInfo[playerid][pInterior] = GetPlayerInterior(playerid); } SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(targetid)); SetPlayerInterior(playerid, GetPlayerInterior(targetid)); TogglePlayerSpectating(playerid, 1); SpectatedID[playerid] = targetid; new Float:X, Float:Y, Float:Z; new Float:health; GetPlayerHealth(targetid, health); new Float:armor; GetPlayerArmour(targetid, armor);GetPlayerPos(playerid, X, Y, Z); GetPlayerName(targetid, pNameGive, sizeof(pNameGive)); new cash = GetPlayerMoney(targetid); if (PlayerInfo[playerid][pAdmin] >= 1) { format(string, sizeof(string), "Specing: [%d]%s [$%d] [H:%.0f] [A:%.0f]",targetid,pNameGive,cash,health,armor); } SendClientMessage(playerid, COLOR_GREEN, string); if(IsPlayerInAnyVehicle(targetid)) { PlayerSpectateVehicle(playerid, GetPlayerVehicleID(targetid)); SpectateType[playerid] = ADMIN_SPEC_TYPE_VEHICLE; } else { PlayerSpectatePlayer(playerid, targetid); SpectateType[playerid] = ADMIN_SPEC_TYPE_PLAYER; } } else { SendClientMessage(playerid, COLOR_ERROR, "That player isn't active !"); return 1; } } return 1; } if(strcmp(cmd, "/gethere", true) == 0) { if(IsPlayerConnected(playerid)) { if(gLogged[playerid] == 1) { temp = strtok(cmdtext, idx); if(!strlen(temp)) { SendClientMessage(playerid, COLOR_SYN, "Synthax: /gethere <playerid/PartOfName> or <carid>"); return 1; } targetid = ReturnUser(temp); if (PlayerInfo[playerid][pAdmin] >= 1) { if (IsPlayerConnected(targetid)) { if(targetid != INVALID_PLAYER_ID) { GetPlayerPos(playerid, x, y, z); if(PlayerInfo[playerid][pInterior] > 0) { SetPlayerInterior(targetid,PlayerInfo[playerid][pInterior]); PlayerInfo[targetid][pInterior] = PlayerInfo[playerid][pInterior]; SetPlayerInterior(targetid, GetPlayerInterior(playerid)); SetPlayerVirtualWorld(targetid, GetPlayerVirtualWorld(playerid)); } if(PlayerInfo[playerid][pInterior] == 0) { SetPlayerInterior(targetid,0); } if(z > 930.0 && PlayerInfo[playerid][pInterior] == 0) { SetPlayerInterior(targetid,1); PlayerInfo[targetid][pInterior] = 1; } if (GetPlayerState(targetid) == 2) { new tmpcar = GetPlayerVehicleID(targetid); SetVehiclePos(tmpcar, x, y+4, z); SetPlayerInterior(targetid, GetPlayerInterior(playerid)); SetPlayerVirtualWorld(targetid, GetPlayerVirtualWorld(playerid)); SetVehicleVirtualWorld(GetPlayerVehicleID(targetid), GetPlayerVirtualWorld(playerid)); } else { SetPlayerPos(targetid,x, y+2, z); } SendClientMessage(targetid, COLOR_LIGHTRED, "You got teleported"); } } else if(strcmp(temp, "car", true) == 0) { temp = strtok(cmdtext, idx); if(!strlen(temp)) { SendClientMessage(playerid, COLOR_SYN, "Synthax: /gethere car <carid>"); return 1; } new carid; carid = strval(temp); GetPlayerPos(playerid, x, y, z); SetVehiclePos(carid,x,y+4, z); SetVehicleVirtualWorld(carid, GetPlayerVirtualWorld(playerid)); } } else { SendClientMessage(playerid, COLOR_ERROR, "Error: Your admin level is not high enough to use this command."); } } else if(gLogged[playerid] != 1) { SendClientMessage(playerid, COLOR_ERROR, "You are not logged in!"); } else { SendClientMessage(playerid, COLOR_ERROR, "Error: Invalid playerid / playername / carid."); } } return 1; } // // Helpers Commands if(strcmp(cmd, "/hh", true) == 0 || strcmp(cmd, "/helperhelp", true) == 0) { if(IsPlayerConnected(playerid)) { if(gLogged[playerid] == 1) { if(PlayerInfo[playerid][pHelper] >= 1) { SendClientMessage(playerid, COLOR_GREEN, "_______________________________________"); if(PlayerInfo[playerid][pHelper] >= 1) { SendClientMessage(playerid, COLOR_WHITE, "** Helper level 1 ** (/hh)elperhelp (/he)lperchat /goto /check"); } if(PlayerInfo[playerid][pHelper] >= 2) { SendClientMessage(playerid, COLOR_WHITE, "** Helper level 2 **"); } if(PlayerInfo[playerid][pHelper] >= 3) { SendClientMessage(playerid, COLOR_WHITE, "** Helper level 3 **"); } if(PlayerInfo[playerid][pHelper] >= 4) { SendClientMessage(playerid, COLOR_WHITE, "** Helper level 4 **"); } if(PlayerInfo[playerid][pHelper] >= 5) { SendClientMessage(playerid, COLOR_WHITE, "** Helper level 5 **"); } if(PlayerInfo[playerid][pHelper] >= 6) { SendClientMessage(playerid, COLOR_WHITE, "** Helper level 6 **"); } SendClientMessage(playerid, COLOR_GREEN, "_______________________________________"); } else { SendClientMessage(playerid, COLOR_ERROR, "Error: Your helper level is not high enough to use this command."); } } else { SendClientMessage(playerid, COLOR_ERROR, "You are not logged in!"); } } return 1; } if(strcmp(cmd, "/he", true) == 0 || strcmp(cmd, "/helperchat", true) == 0) { if(IsPlayerConnected(playerid)) { if(gLogged[playerid] == 1) { GetPlayerName(playerid, pName, sizeof(pName)); new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= ' ')) { idx++; } new offset = idx; new result[128]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } result[idx - offset] = EOS; if(!strlen(result)) { SendClientMessage(playerid, COLOR_SYN, "Synthax: (/he)lperchat <text>"); return 1; } if (PlayerInfo[playerid][pHelper] >= 1 && PlayerInfo[playerid][pHelper] <= 5) { format(string, sizeof(string), "** Helper Level %d %s : %s **", PlayerInfo[playerid][pHelper], pName, result); HelpersBroadCast(COLOR_YELLOW2, string); } if (PlayerInfo[playerid][pHelper] == 6) { format(string, sizeof(string), "{CFAE70}** Helper Level %d %s : %s **", PlayerInfo[playerid][pHelper], pName, result); HelpersBroadCast(COLOR_WHITE, string); } if (PlayerInfo[playerid][pAdmin] < 1) { SendClientMessage(playerid, COLOR_ERROR, "Error: Your helper level is not high enough to use this command."); return 1; } } else { SendClientMessage(playerid, COLOR_ERROR, "You are not logged in!"); } } return 1; } // // Admins & Helpers commands if(strcmp(cmd, "/goto", true) == 0) { if(IsPlayerConnected(playerid)) { if(gLogged[playerid] == 1) { temp = strtok(cmdtext, idx); if(!strlen(temp)) { SendClientMessage(playerid, COLOR_SYN, "Synthax: /goto <playerid/PartOfName> or <carid> or <destination>"); return 1; } targetid = ReturnUser(temp); if (PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pHelper] >= 1) { if (IsPlayerConnected(targetid)) { if(targetid != INVALID_PLAYER_ID) { if(GetPlayerState(targetid) == PLAYER_STATE_SPECTATING) { SendClientMessage(playerid, COLOR_YELLOW3, "That Player is spectating Someone."); } GetPlayerPos(targetid, Float:x, Float:y, Float:z); if(PlayerInfo[targetid][pInterior] > 0) { SetPlayerInterior(playerid,PlayerInfo[targetid][pInterior]); PlayerInfo[playerid][pInterior] = PlayerInfo[targetid][pInterior]; } if(PlayerInfo[playerid][pInterior] == 0) { SetPlayerInterior(playerid,0); } if(Float:z > 530.0 && PlayerInfo[targetid][pInterior] == 0) { SetPlayerInterior(playerid,1); PlayerInfo[playerid][pInterior] = 1; } if (GetPlayerState(playerid) == 2) { new tempcar = GetPlayerVehicleID(playerid); SetVehiclePos(tempcar, Float:x, Float:y+4, Float:z); } else { SetPlayerPos(playerid, Float:x, Float:y+2, Float:z); } SendClientMessage(playerid, COLOR_LIGHTRED, "You got teleported"); SetPlayerInterior(playerid, GetPlayerInterior(targetid)); SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(targetid)); } } else if(strcmp(temp, "car", true) == 0) { temp = strtok(cmdtext, idx); if(!strlen(temp)) { SendClientMessage(playerid, COLOR_SYN, "Synthax: /goto car <carid>"); return 1; } new tempcar = strval(temp); GetVehiclePos(tempcar, Float:x, Float:y, Float:z); if (GetPlayerState(playerid) == 2) { new tempcar2 = GetPlayerVehicleID(playerid); SetVehiclePos(tempcar2, Float:x, Float:y, Float:z); } else { SetPlayerPos(playerid, Float:x, Float:y, Float:z); } SendClientMessage(playerid, COLOR_LIGHTRED, "You got teleported"); SetPlayerInterior(playerid, 0); } else if(strcmp(temp, "ls", true) == 0) { if (GetPlayerState(playerid) == 2) { new tempcar = GetPlayerVehicleID(playerid); SetVehiclePos(tempcar, 1529.6,-1691.2,13.3); } else { SetPlayerPos(playerid, 1529.6,-1691.2,13.3); } SendClientMessage(playerid, COLOR_LIGHTRED, "You got teleported"); SetPlayerInterior(playerid,0); PlayerInfo[playerid][pInterior] = 0; } else { SendClientMessage(playerid, COLOR_ERROR, "Error: Invalid playerid / playername / carid / destination."); } } else { SendClientMessage(playerid, COLOR_ERROR, "Error: Your admin level is not high enough to use this command."); } } else { SendClientMessage(playerid, COLOR_ERROR, "You are not logged in!"); } } return 1; } if(strcmp(cmd, "/check", true) == 0) { if(IsPlayerConnected(playerid)) { if(gLogged[playerid] == 1) { temp = strtok(cmdtext, idx); if(!strlen(temp)) { SendClientMessage(playerid, COLOR_SYN, "Synthax: /check <playerid/PartOfName>"); return 1; } if (PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pHelper] >= 1) { targetid = ReturnUser(temp); if(targetid != INVALID_PLAYER_ID) { GetPlayerName(targetid, pNameGive, sizeof(pNameGive)); ShowStats(playerid, targetid); } else { SendClientMessage(playerid, COLOR_ERROR, "Error: Invalid playerid / playername."); } } else { SendClientMessage(playerid, COLOR_ERROR, "Error: Your admin level is not high enough to use this command."); } } else { SendClientMessage(playerid, COLOR_ERROR, "You are not logged in!"); } } return 1; } // // Leader commands if(strcmp(cmd, "/uninvite", true) == 0) { if(IsPlayerConnected(playerid)) { if(gLogged[playerid] == 1) { temp = strtok(cmdtext, idx); if(!strlen(temp)) { SendClientMessage(playerid, COLOR_SYN, "Synthax: /uninvite [1 with Fanction Punish/0 without Fanction Punish] <playerid/PartOfName>"); return 1; } new x_nr; x_nr = strvalEx(temp); temp = strtok(cmdtext, idx); targetid = ReturnUser(temp); if(x_nr == 0) { if(!strlen(temp)) { SendClientMessage(playerid, COLOR_SYN, "Synthax: /uninvite 0 <playerid/PartOfName>"); return 1; } if (PlayerInfo[playerid][pLeader] >= 1 || PlayerInfo[playerid][pAdmin] >= 5 ) { if(IsPlayerConnected(targetid)) { if(targetid != INVALID_PLAYER_ID) { if(PlayerInfo[playerid][pLeader] != PlayerInfo[targetid][pMember]) { SendClientMessage(playerid, COLOR_ERROR, "Uninvite: That player is not in your faction!"); return 1; } format(string, sizeof(string), "* You got fired by %s.", pName); SendClientMessage(targetid, COLOR_LIGHTRED, string); SendClientMessage(targetid, COLOR_LIGHTBLUE, "* You're a civilian now."); PlayerInfo[targetid][pMember] = 0; Update(targetid, pMemberu); PlayerInfo[targetid][pRank] = 0; Update(targetid, pRanku); format(string, sizeof(string), "You fired %s.", pNameGive); SendClientMessage(playerid, COLOR_LIGHTRED, string); } } else { SendClientMessage(playerid, COLOR_ERROR, "Error: Invalid playerid / playername."); } } else { SendClientMessage(playerid, COLOR_ERROR, "** You are not autorized to use this command!"); } } if(x_nr == 1) { if(!strlen(temp)) { SendClientMessage(playerid, COLOR_SYN, "Synthax: /uninvite 1 <playerid/PartOfName>"); return 1; } if (PlayerInfo[playerid][pLeader] >= 1 || PlayerInfo[playerid][pAdmin] >= 6 ) { if(IsPlayerConnected(targetid)) { if(targetid != INVALID_PLAYER_ID) { if (PlayerInfo[targetid][pMember] > 0) { if(PlayerInfo[playerid][pLeader] != PlayerInfo[targetid][pMember]) { SendClientMessage(playerid, COLOR_ERROR, "Uninvite: That player is not in your faction!"); return 1; } format(string, sizeof(string), "* You got fired by %s.", pName); SendClientMessage(targetid, COLOR_LIGHTBLUE, string); SendClientMessage(targetid, COLOR_LIGHTBLUE, "* You're a civilian now."); PlayerInfo[targetid][pMember] = 0; Update(targetid, pMemberu); PlayerInfo[targetid][pRank] = 0; Update(targetid, pRanku); SpawnPlayer(targetid); format(string, sizeof(string), " You dismissed %s.", pNameGive); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); } } } else { SendClientMessage(playerid, COLOR_ERROR, "Error: Invalid playerid / playername."); } } else { SendClientMessage(playerid, COLOR_ERROR, "** You are not autorized to use this command!!"); } } } else { SendClientMessage(playerid, COLOR_ERROR, "You are not logged in!"); } } return 1; } // // Faction Member Commands if(strcmp(cmd, "/f", true) == 0 || strcmp(cmd, "/faction", true) == 0) { if(IsPlayerConnected(playerid)) { GetPlayerName(playerid, pName, sizeof(pName)); new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= ' ')) { idx++; } new offset = idx; new result[128]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } result[idx - offset] = EOS; if(!strlen(result)) { SendClientMessage(playerid, COLOR_SYN, "Synthax: (/f)action <faction chat>"); return 1; } if(PlayerInfo[playerid][pLeader] > 0 || PlayerInfo[playerid][pMember] > 0) { if(PlayerInfo[playerid][pMember] == 1) { if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** (( Chief %s: %s )) **", pName, result); } else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** (( Captain %s: %s )) **", pName, result); } else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** (( Lieutenant %s: %s )) **", pName, result); } else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** (( Sergeant %s: %s )) **", pName, result); } else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** (( Officer %s: %s )) **", pName, result); } else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** (( Cadet %s: %s )) **", pName, result); } else { format(string, sizeof(string), "** (( Cadet %s: %s )) **", pName, result); } FactionsBroadCast(PlayerInfo[playerid][pMember], COLOR_FACTION_CHAT, string); } else if(PlayerInfo[playerid][pMember] == 4) { if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** (( Chief Fireman/Paramedic %s: %s )) **", pName, result); } else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** (( Paramedic Field %s: %s )) **", pName, result); } else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** (( Ambulance Commander %s: %s )) **", pName, result); } else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** (( Paramedic in charge %s: %s )) **", pName, result); } else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** (( Fire Paramedic %s: %s )) **", pName, result); } else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** (( Candidate Fire Paramedic %s: %s )) **", pName, result); } else { format(string, sizeof(string), "** (( Private %s: %s )) **", pName, result); } FactionsBroadCast(PlayerInfo[playerid][pMember], COLOR_FACTION_CHAT, string); } return 1; } else { SendClientMessage(playerid, COLOR_ERROR, "Error: You are not part of a Faction!"); return 1; } } return 1; } if(strcmp(cmd, "/radio", true) == 0 || strcmp(cmd, "/r", true) == 0) { if(IsPlayerConnected(playerid)) { GetPlayerName(playerid, pName, sizeof(pName)); new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= ' ')) { idx++; } new offset = idx; new result[128]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } result[idx - offset] = EOS; if(!strlen(result)) { SendClientMessage(playerid, COLOR_SYN, "Synthax: (/r)adio <radio chat>"); return 1; } if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1) { if(PlayerInfo[playerid][pRank] >= 6) { format(string, sizeof(string), "** LSPD Chief %s: %s, over. **", pName, result); } else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** LSPD Captain %s: %s, over. **", pName, result); } else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** LSPD Lieutenant %s: %s, over. **", pName, result); } else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** LSPD Sergeant %s: %s, over. **", pName, result); } else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** LSPD Officer %s: %s, over. **", pName, result); } else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** LSPD Cadet %s: %s, over. **", pName, result); } else { format(string, sizeof(string), "** LSPD Cadet %s: %s, over. **", pName, result); } RadioBroadCast(PlayerInfo[playerid][pMember], COLOR_RADIO_CHAT, string); return 1; } if(PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2) { if(PlayerInfo[playerid][pRank] >= 6) { format(string, sizeof(string), "** LVPD Chief %s: %s, over. **", pName, result); } else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** LVPD Captain %s: %s, over. **", pName, result); } else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** LVPD Lieutenant %s: %s, over. **", pName, result); } else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** LVPD Sergeant %s: %s, over. **", pName, result); } else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** LVPD Officer %s: %s, over. **", pName, result); } else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** LVPD Cadet %s: %s, over. **", pName, result); } else { format(string, sizeof(string), "** Cadet %s: %s, over. **", pName, result); } RadioBroadCast(PlayerInfo[playerid][pMember], COLOR_RADIO_CHAT, string); return 1; } if(PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3) { if(PlayerInfo[playerid][pRank] >= 6) { format(string, sizeof(string), "** SFPD Chief %s: %s, over. **", pName, result); } else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** SFPD Captain %s: %s, over. **", pName, result); } else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** SFPD Lieutenant %s: %s, over. **", pName, result); } else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** SFPD Sergeant %s: %s, over. **", pName, result); } else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** SFPD Officer %s: %s, over. **", pName, result); } else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** SFPD Cadet %s: %s, over. **", pName, result); } else { format(string, sizeof(string), "** Cadet %s: %s, over. **", pName, result); } RadioBroadCast(PlayerInfo[playerid][pMember], COLOR_RADIO_CHAT, string); return 1; } else if(PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4) { if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** Director %s: %s, over. **", pName, result); } else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** Assistant Director in Charge %s: %s, over. **", pName, result); } else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** Special Agent in Charge %s: %s, over. **", pName, result); } else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** Special Agent %s: %s, over. **", pName, result); } else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** Special Agent Trainee %s: %s, over. **", pName, result); } else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** Professional Staff %s: %s, over. **", pName, result); } else { format(string, sizeof(string), "** Intern %s: %s, over. **", pName, result); } RadioBroadCast(PlayerInfo[playerid][pMember], COLOR_RADIO_CHAT, string); return 1; } else if(PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5) { if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** General %s: %s, over. **", pName, result); } else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** Lieutenant %s: %s, over. **", pName, result); } else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** Captain %s: %s, over. **", pName, result); } else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** Major %s: %s, over. **", pName, result); } else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** Sergeant %s: %s, over. **", pName, result); } else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** Private %s: %s, over. **", pName, result); } else { format(string, sizeof(string), "** Private %s: %s, over. **", pName, result); } RadioBroadCast(PlayerInfo[playerid][pMember], COLOR_RADIO_CHAT, string); return 1; } else if(PlayerInfo[playerid][pMember]== 6 || PlayerInfo[playerid][pLeader]== 6) { if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** Chief Paramedic %s: %s, over. **", pName, result); } else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** Assistant Chief Paramedic %s: %s, over. **", pName, result); } else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** Ambulance Chief %s: %s, over. **", pName, result); } else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** Paramedic in Charge %s: %s, over. **", pName, result); } else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** Paramedic %s: %s, over. **", pName, result); } else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** Candidate Paramedic %s: %s, over. **", pName, result); } else { format(string, sizeof(string), "** Candidate Paramedic %s: %s, over. **", pName, result); } RadioBroadCast(PlayerInfo[playerid][pMember], COLOR_RADIO_CHAT, string); return 1; } else { SendClientMessage(playerid, COLOR_ERROR, "Error: You are not part of a Team!"); return 1; } } return 1; } // return SendClientMessage(playerid, COLOR_YELLOW2, "Error: Unknown command"); } Imagini / Video (optional):N-amAti incercat sa rezolvati singur?:Da, dar nu ma pricem la comenzile dini ca sunt invatat doar cu comenzile pe zcmd deoarece sunt mult mai sigure si mult mai complexe, cine ma a ajuta dau +1 cat pot da timp de 7 zile.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.