/setadminname issue - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: /setadminname issue (
/showthread.php?tid=613028)
/setadminname issue -
Usama651 - 23.07.2016
When i try to kick some 1 ban some 1or /setadmin /prison /jail no cmd working some 1told me its plugin issue can u tell me what i have to do he saw my cmd there is no issue isssue is my plaugin or etc
CMD IS HERE
PHP код:
CMD:setadminname(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 5)
{
/*if(AdminDuty[playerid] != 1 && PlayerInfo[playerid][pAdmin] < 6)
{
SendClientMessage(playerid,COLOR_WHITE, "You're not on-duty as admin. To access your admin commands you must be on-duty. Type /aduty to go on-duty.");
return 1;
}*/
new giveplayerid, name[32];
if(sscanf(params, "us[32]", giveplayerid, name))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /setadminname [playerid/partofname] [name]");
return 1;
}
if(PlayerInfo[giveplayerid][pAdmin] < 1)
{
SendClientMessage(playerid, COLOR_WHITE, "The player is not an admin.");
return 1;
}
if(AdminDuty[giveplayerid] != 0)
{
SendClientMessage(playerid, COLOR_WHITE, "That admin is currently on-duty. They must go off-duty in order for you to set their admin name.");
return 1;
}
new length = strlen(name);
if(length < 3 || length > 20)
{
SendClientMessage(playerid, COLOR_WHITE, "The name can't less than 3 characters or more than 20 characters.");
return 1;
}
if(strfind(name, "_", true) != -1)
{
SendClientMessage(playerid, COLOR_WHITE, "The admin name must be one name. There can't be an underscore in the name.");
return 1;
}
if(strcmp(name, "Usama", true) == 0 && PlayerInfo[playerid][pAdmin] < 6) {
SendClientMessage(playerid, COLOR_WHITE, "stop ! im Usama ! you're not Usama !");
return 1;
}
new string[128];
format(string, sizeof(string), "AdmCmd: %s has set %s's admin name to '%s'.", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), name);
ABroadCast(COLOR_LIGHTRED, string, 1);
format(PlayerInfo[giveplayerid][pAdminName], 32, name);
}
else SendClientMessage(playerid, COLOR_GRAD1, "You're not authorized to use that command!");
return 1;
}
Re: /setadminname issue -
Stinged - 23.07.2016
Download sscanf2:
https://sampforum.blast.hk/showthread.php?tid=602923
Place "sscanf.dll" (.so if on linux) in a folder named "plugins"
If "plugins" exist in "server.cfg", add "sscanf" to the line (.so if on linux)
If it doesn't, add it and do the same thing.
Re: /setadminname issue -
Usama651 - 24.07.2016
Bro i do that but its giving this error
PHP код:
SA-MP Dedicated Server
----------------------
v0.3.7-R2, (C)2005-2015 SA-MP Team
[24/07/2016 00:16:26]
[24/07/2016 00:16:26] Server Plugins
[24/07/2016 00:16:26] --------------
[24/07/2016 00:16:26] Loading plugin: mysql
[24/07/2016 00:16:26]
> MySQL plugin R6-2 successfully loaded.
[24/07/2016 00:16:26] Loaded.
[24/07/2016 00:16:26] Loading plugin: streamer
[24/07/2016 00:16:26]
*** Streamer Plugin v2.6.1 by Incognito loaded ***
[24/07/2016 00:16:26] Loaded.
[24/07/2016 00:16:26] Loading plugin: Whirlpool
[24/07/2016 00:16:26]
[24/07/2016 00:16:26] ==================
[24/07/2016 00:16:26]
[24/07/2016 00:16:26] Whirlpool loaded
[24/07/2016 00:16:26]
[24/07/2016 00:16:26] ==================
[24/07/2016 00:16:26]
[24/07/2016 00:16:26] Loaded.
[24/07/2016 00:16:26] Loading plugin: sscanf.dll
[24/07/2016 00:16:27] Failed.
[24/07/2016 00:16:27] Loading plugin: nativechecker
[24/07/2016 00:16:28] Loaded.
[24/07/2016 00:16:28] Loaded 4 plugins.
[24/07/2016 00:16:28]
[24/07/2016 00:16:28] Filterscripts
[24/07/2016 00:16:28] ---------------
[24/07/2016 00:16:28] Loading filterscript 'yom_buttons.amx'...
[24/07/2016 00:16:28] Loading filterscript 'anims.amx'...
[24/07/2016 00:16:28] Loading filterscript 'Sweper.amx'...
[24/07/2016 00:16:28] Loaded 3 filterscripts.
[24/07/2016 00:16:28] Error: Function not registered: 'SSCANF_Init'
[24/07/2016 00:16:28] Error: Function not registered: 'SSCANF_Join'
[24/07/2016 00:16:28] Error: Function not registered: 'SSCANF_Leave'
[24/07/2016 00:16:28] Error: Function not registered: 'sscanf'
[24/07/2016 00:16:28] Script[gamemodes/ALRP.amx]: Run time error 19: "File or function is not found"
[24/07/2016 00:16:28] Number of vehicle models: 1
Re: /setadminname issue -
GuyB790 - 24.07.2016
Update your include and plugin, then re-compile.
Re: /setadminname issue -
Usama651 - 24.07.2016
i do:/ but its issue can u join me on fb *******/usamakhalid666 or exp;lain me more pls
Re: /setadminname issue -
CrazyPerry - 24.07.2016
update your includes and plugins to the latest version i might work