Command problem
#1

Why this command does not work?:
PHP код:
dcmd_Server(playeridparams[]) {
if(
PlayerInfo[playerid][AdminLvl] < 20) return 0;
if(!
PlayerInfo[playerid][AdminLogged])return SendClientMessage(playerid,COLOR_RED,".айрк озебш магойп");
if(!
strlen(params))
return 
SendClientMessage(playerid,COLOR_RED,"Usage: /Server <Gmx/Exit/LoadFs/Unloadfs/Lock/Open>");
if(!
strcmp(params"LoadFs"true))
{
new 
fs[64];
if(
sscanf(params"s"fs)) return SendClientMessage(playerid,COLOR_WHITE,"Usage: /Server LoadFs <FS Name>");
new 
string[128];
format(string,128,"loadfs %s",fs);
SendRconCommand(string);
format(string,128,"Try to load FS: %s.amx... Loaded!",fs);
return 
SendClientMessage(playerid,COLOR_GREEN,string);
}
return 
true;

Reply
#2

Which problem do you get, please use [ pawn ] tag too.

But...
Replace
pawn Код:
if ( !strcmp( params, "LoadFs", true ) ) // Idk, this should works though.
if ( sscanf( params, "s", fs ) )
With
pawn Код:
if ( !strcmp( params, "LoadFs", true, 6 ) )
if ( sscanf( params, "s[ 64 ]", fs ) )
Please, add more information, what is the error.
Reply
#3

The problem is this line:
if(!sscanf(params,"s[64]",fs)) return SendClientMessage(playerid,COLOR_WHITE,"Usage: /Server LoadFs <FS Name>");

When I use this command this send It sends me this message Usage: /Server LoadFs <FS Name>
Reply
#4

Someone?
Reply
#5

pawn Код:
if(sscanf(params,"s[64]",fs)) return SendClientMessage(playerid,COLOR_WHITE,"Usage: /Server LoadFs <FS Name>");
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)