Jump to content

SeDaTiV

Membru
  • Posts

    13
  • Joined

  • Last visited

    Never

Everything posted by SeDaTiV

  1. Salutari sa-mp.ro! Am incercat sa fac o comanda, pentru police department cu vreo 3-4 skinuri de PD. Comanda vine cam asa. [table] COMMAND:pduniform(playerid, params[]){ if(GetPVarInt(playerid, "Faction") == 7) { SetPVarInt(playerid, "Model", 280); SetPlayerSkinEx(playerid, 280); } } [/table] Cand am dat compile si am intrat pe server, zicea ca , comanda nu exista in baza de date. Daca ma puteti ajuta sa o fac sa imi de-a patru skinuri , 280 , 281 (alea de LSPD) si doua skinuri normale. (La costum)
  2. Deci asta il bag la sfarsitul comenzii ? :shocked:
  3. Eu am comanda asta.. COMMAND:ban(playerid, params[]) { new text[128],targetid,string[256],sendername[MAX_PLAYER_NAME],giveplayer[MAX_PLAYER_NAME]; if(sscanf(params, "us[128]", targetid, text)) SendClientMessage(playerid, COLOR_GREY, "USAGE: /ban [playerid] [reason]"); else { if (GetPVarInt(playerid, "PlayerLogged") == 0) return SendClientMessage(playerid, COLOR_WHITE, "You must be logged in to use this."); if(!AdminUser(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to create a admin user, /admincreate."); if(GetPVarInt(playerid, "AdminLogged") == 0) return SendClientMessage(playerid, COLOR_GREY, "You need to login into your admin account, /adminlogin."); if (playerid == targetid) return SendClientMessage(playerid, COLOR_GREY, "You cannot do this to yourself."); if (!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_WHITE, "This player is not connected !"); if(GetPVarInt(targetid, "Admin") == 10) return SendClientMessage(playerid, COLOR_GREY, "Can't do this to a Lead Admin."); if(IsPlayerNPC(targetid)) return SendClientMessage(playerid, COLOR_GREY, "Can't do this to a NPC."); if(strlen(text) >= 100) return SendClientMessage(playerid, COLOR_WHITE, "Ban Reason is too long."); if(GetPVarInt(playerid, "Admin") >= 2) { format(sendername, sizeof(sendername), "%s", AdminName(playerid)); format(giveplayer, sizeof(giveplayer), "%s", PlayerName(targetid)); GiveNameSpace(sendername); GiveNameSpace(giveplayer); if(GetPVarInt(playerid, "AHide") == 1 || GetPVarInt(playerid, "Admin") >= 11) sendername = "Hidden"; format(string, sizeof(string), "AdmCmd: %s was banned by Admin %s Reason:[%s].", giveplayer, sendername, text); SendClientMessageToAll(COLOR_LIGHTRED, string); BanLog(string); format(string, sizeof(string), "IP: %s | Host: %s", PrintPlayerIP(targetid), PlayerInfo[targetid][pHost]); SendAdminAndRegMessage(COLOR_YELLOW,string); SetPVarInt(targetid, "Banned", 1); strmid(PlayerInfo[playerid][pLBannedBy], text, 0, strlen(PlayerInfo[playerid][pAdmName]), 255); SetPVarInt(targetid, "Bans", GetPVarInt(targetid, "Bans")+1); BanExtra(targetid,text,sendername); } else SendClientMessage(playerid, COLOR_LIGHTRED, "You do not have access to this command !"); } return 1; }
  4. Salut SA-MP.ro , avand in vedere ca am un nivel de scripting incepator spre incepator-mediu vin sa va cer ajutorul. Deci sa trecem la subiect.. cand dau cuiva ban sau kick ii da doar "Server Closed the Connection" playerul nu mai stie de ce a primit kick sau ban. Mai am inca o problema, pe GameMode-ul meu este un sistem de inregistrare direct din joc, unde sunt puse niste intrebari, cand cineva isi posteaza contul poti sa il refuzi cu un motiv, iar daca il refuzi si scrii motivul playerului nu ii apare de ce i-ai refuzat contul. Comanda /kick: [table] COMMAND:kick(playerid, params[]){ new text[128],targetid,string[256],sendername[MAX_PLAYER_NAME],giveplayer[MAX_PLAYER_NAME]; if(sscanf(params, "us[128]", targetid, text)) SendClientMessage(playerid, COLOR_GREY, "USAGE: /kick [playerid] [reason]"); else { if (GetPVarInt(playerid, "PlayerLogged") == 0) return SendClientMessage(playerid, COLOR_WHITE, "You must be logged in to use this."); if(!AdminUser(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to create a admin user, /admincreate."); if(GetPVarInt(playerid, "AdminLogged") == 0) return SendClientMessage(playerid, COLOR_GREY, "You need to login into your admin account, /adminlogin."); if (!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_WHITE, "This player is not connected !"); if(IsPlayerNPC(targetid)) return SendClientMessage(playerid, COLOR_GREY, "Can't do this to a NPC."); if(GetPVarInt(playerid, "Admin") >= 1) { format(sendername, sizeof(sendername), "%s", AdminName(playerid)); format(giveplayer, sizeof(giveplayer), "%s", PlayerName(targetid)); GiveNameSpace(sendername); GiveNameSpace(giveplayer); if(GetPVarInt(playerid, "AHide") == 1 || GetPVarInt(playerid, "Admin") >= 11) sendername = "Hidden"; format(string, sizeof(string), "AdmCmd: %s was kicked by Admin %s Reason:[%s].", giveplayer, sendername, text); SendClientMessageToAll(COLOR_LIGHTRED, string); SetPVarInt(targetid, "Kicks", GetPVarInt(targetid, "Kicks")+1); KickEx(targetid); } else { SendClientMessage(playerid, COLOR_LIGHTRED, "You do not have access to this command !"); } } return 1; } [/td] [/table] Comanda /ban: [table] COMMAND:ban(playerid, params[]){ new text[128],targetid,string[256],sendername[MAX_PLAYER_NAME],giveplayer[MAX_PLAYER_NAME]; if(sscanf(params, "us[128]", targetid, text)) SendClientMessage(playerid, COLOR_GREY, "USAGE: /ban [playerid] [reason]"); else { if (GetPVarInt(playerid, "PlayerLogged") == 0) return SendClientMessage(playerid, COLOR_WHITE, "You must be logged in to use this."); if(!AdminUser(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to create a admin user, /admincreate."); if(GetPVarInt(playerid, "AdminLogged") == 0) return SendClientMessage(playerid, COLOR_GREY, "You need to login into your admin account, /adminlogin."); if (playerid == targetid) return SendClientMessage(playerid, COLOR_GREY, "You cannot do this to yourself."); if (!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_WHITE, "This player is not connected !"); if(GetPVarInt(targetid, "Admin") == 10) return SendClientMessage(playerid, COLOR_GREY, "Can't do this to a Lead Admin."); if(IsPlayerNPC(targetid)) return SendClientMessage(playerid, COLOR_GREY, "Can't do this to a NPC."); if(strlen(text) >= 100) return SendClientMessage(playerid, COLOR_WHITE, "Ban Reason is too long."); if(GetPVarInt(playerid, "Admin") >= 2) { format(sendername, sizeof(sendername), "%s", AdminName(playerid)); format(giveplayer, sizeof(giveplayer), "%s", PlayerName(targetid)); GiveNameSpace(sendername); GiveNameSpace(giveplayer); if(GetPVarInt(playerid, "AHide") == 1 || GetPVarInt(playerid, "Admin") >= 11) sendername = "Hidden"; format(string, sizeof(string), "AdmCmd: %s was banned by Admin %s Reason:[%s].", giveplayer, sendername, text); SendClientMessageToAll(COLOR_LIGHTRED, string); BanLog(string); format(string, sizeof(string), "IP: %s | Host: %s", PrintPlayerIP(targetid), PlayerInfo[targetid][pHost]); SendAdminAndRegMessage(COLOR_YELLOW,string); SetPVarInt(targetid, "Banned", 1); strmid(PlayerInfo[playerid][pLBannedBy], text, 0, strlen(PlayerInfo[playerid][pAdmName]), 255); SetPVarInt(targetid, "Bans", GetPVarInt(targetid, "Bans")+1); BanExtra(targetid,text,sendername); } else SendClientMessage(playerid, COLOR_LIGHTRED, "You do not have access to this command !"); } return 1; } [/table] Iar asta e comanda de la register cand refuzi contul: [table] case 99: // Registration Application Denied Outcome { TogglePlayerControllableEx(playerid, true); new string[128], targetid = GetPVarInt(playerid, "RegPlayer"); if(IsPlayerNPC(targetid)) return SendClientMessage(playerid, COLOR_GREY, "Can't do this to a NPC."), DeletePVar(playerid, "RegPlayer"); if(GetPVarInt(targetid, "Approve") != 0) return SendClientMessage(playerid, COLOR_GREY, "This player is already approved."), DeletePVar(playerid, "RegPlayer"); if (GetPVarInt(targetid, "PlayerLogged") == 0) return SendClientMessage(playerid, COLOR_WHITE, "Player is not logged in."), DeletePVar(playerid, "RegPlayer"); //if(GetPVarInt(targetid, "ConnectTime") >= 24) return SendClientMessage(playerid, COLOR_GREY, "Player has too much TLS."), DeletePVar(playerid, "RegPlayer"); if(strlen(PlayerInfo[targetid][pQuest5]) < 5) return SendClientMessage(playerid, COLOR_GREY, "Player has not posted his answers."), DeletePVar(playerid, "RegPlayer"); format(string, sizeof(string), "RegCmd: %s denied player %s for %s.", PlayerName(playerid), PlayerName(targetid), inputtext); SendAdminAndRegMessage(COLOR_LIGHTRED,string); RegLog(string); SetPVarInt(targetid, "PlayerLogged", 0); format(string, sizeof(string), "users/%s.ini", PlayerName(targetid)); DOF2_RemoveFile(string); format(string, sizeof(string), "Your account was denied by %s.", PlayerName(targetid)); SendClientMessage(targetid,COLOR_LIGHTRED,string); format(string, sizeof(string), "Reason: %s.", inputtext); SendClientMessage(targetid,COLOR_LIGHTRED,string); KickEx(targetid); DeletePVar(playerid, "RegPlayer"); DeletePVar(playerid, "AppWait"); } [td] [/table]
  5. Am rezolvat . Am schimbat GM da acum am alta problema... In GM respectiv nu se poate conecta nimeni decat daca au 2 nume adica ex : sedativ_sedativ
  6. Nu merge compilat imi da ceva errori..
  7. Pai iti multumesc ca mi`ai raspuns. Dar te rog sa imi zici si mie unde trebuie sa modific daca nu doar in gamemode .. si acolo am cautat toate numele de pe server meu si le`am inlocuit si cu notepad ++ si cu pawno ..
  8. Salut sunt nou. Si am o problema cu GM meu .. Cand vreau sa modific numele de la fostul game nup se schimba.. adica cand intru pe server e acelasi nume..Stie cineva cum sa fac ?
  9. Am postat un server acum 10 min pot sti daca a fost aprobat sau nu???
  10. Si in cat timp va fi aprobat si de unde stie daca nu o sal mai aprobe ..?
  11. Salut vreau sa postez un srv si imi tot apare ceva si nu il pot posta. Ce fac?
×
×
  • 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.