help with id! - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: help with id! (
/showthread.php?tid=214085)
help with id! -
[MKD]Max - 20.01.2011
this command is work and all good no erros but what is the problem when i do in the game
/setlevel (playerid) (level)
Exampel
/setlevel 3 1
its tell me
SERVER: UNKNOWN COMMAND
Код:
dcmd_setlevel(playerid, params[])
{
new Level, pID, pName[24], str[128], PlayerFile[100];
if(Player[playerid][admin] < 5) return SendClientMessage(playerid, COLOR_RED, "You Dont Have Right To Use This Command");
if(sscanf(params, "ud",playerid, Level)) return SendClientMessage(playerid, COLOR_RED, "|| Usage: /setlevel [playerid] [level] ||");
GetPlayerName(playerid, pName, sizeof(pName));
format(PlayerFile, sizeof(PlayerFile), "maxadmin/users/%s.ini", pName);
if(!IsPlayerConnected(pID)) return SendClientMessage(playerid,COLOR_RED,"Nobody is connected with this ID!");
if(!dini_Exists(PlayerFile)) return SendClientMessage(playerid, COLOR_RED, "That player isn't registered!");
if(Player[playerid][admin] == Level) return SendClientMessage(playerid, COLOR_RED, "ERROR: That player is moderator already!");
if(Level == 1)
{
format(str, sizeof(str), "You have promoted %s to a staff team", pName);
SendClientMessage(playerid, COLOR_GREEN, str);
format(str, sizeof(str), "You have prometed to a staff team status.", pName);
SendClientMessage(pID, COLOR_GREEN, str);
Player[playerid][admin] = 1;
dini_IntSet(PlayerFile, "Level", 1);
}
return 1;
}
Re: help with id! -
blackwave - 20.01.2011
on OnPlayerCommandText add:
pawn Код:
dcmd(setlevel,8,cmdtext);
Re: help with id! -
[MKD]Max - 20.01.2011
added and stilll
Re: help with id! -
Ironboy500[TW] - 20.01.2011
Other commands work good?
Re: help with id! -
[MKD]Max - 20.01.2011
yea all workd good now if someone join as id 3 so when i do /setlevel 3 3 its work when he left and if i do /setlevel 3
its say UNKNOWN COMMAND
Re: help with id! -
Ironboy500[TW] - 20.01.2011
Could you show us your code?
Re: help with id! -
[MKD]Max - 20.01.2011
give me your email
Re: help with id! -
Ironboy500[TW] - 20.01.2011
You can post here, or send me forum PM.
Re: help with id! -
[MKD]Max - 20.01.2011
add me in your email
Thift@live.com
i will let you join my server by hamachi
Re: help with id! -
Ironboy500[TW] - 20.01.2011
Change
Код:
if(sscanf(params, "ud",playerid, Level)) return SendClientMessage(playerid, COLOR_RED, "|| Usage: /setlevel [playerid] [level] ||");
if(Player[playerid][admin] == Level) return SendClientMessage(playerid, COLOR_RED, "ERROR: That player is moderator already!");
to
Код:
if(sscanf(params, "ud",pID, Level)) return SendClientMessage(playerid, COLOR_RED, "|| Usage: /setlevel [playerid] [level] ||");
if(Player[pID][admin] == Level) return SendClientMessage(playerid, COLOR_RED, "ERROR: That player is moderator already!");