Help at making /CMD [ID] [SOMETHING ELSE] commands
#1

I made this MakeAdmin cmd here:

Код:
CMD:makeadmin(playerid, params[])
{
	if(IsPlayerAdmin(playerid))
	{

		if(isnull(params))
 		{
 		    SendClientMessage(playerid,ADMINFS_MESSAGE_COLOR,"Usage: /Makeadmin [ID] [Level]");
 		    return 1;
		}
                if(!isnumeric(params))
 		{
 		    SendClientMessage(playerid,ADMINFS_MESSAGE_COLOR,"Usage: /Makeadmin [ID] [Level]");
 		    return 1;
		}
		
		new targetid = strval(params);
		new SendMSG[180];
		new SendMSGtoall[180];
		new SendMSGtoguy[180];
		new Givername[MAX_PLAYER_NAME];
		new Receivername[MAX_PLAYER_NAME];
		new levelz;
		sscanf(params," i",levelz);
		if(levelz > 5)
		{
			SendClientMessage(playerid,ADMINFS_MESSAGE_COLOR,"Max admin level is 5!");
			return 1;
		}
		GetPlayerName(playerid,Givername,sizeof(Givername));
		GetPlayerName(targetid,Receivername,sizeof(Receivername));
		format(SendMSGtoguy,sizeof(SendMSGtoguy),"{B900EF}Admin %s(%d) has made you an Administrator level %d!",Givername,playerid,levelz);
		format(SendMSG,sizeof(SendMSG),"{B900EF}You made %s(%d) an Admin level %d!",Receivername,targetid,levelz);
		format(SendMSGtoall,sizeof(SendMSGtoall),"{B900EF}Admin %s(%d) has made %s(%d) an Admin! Level:%d",Givername,playerid,Receivername,targetid,levelz);
		SendClientMessage(targetid,COLOR_WHITE,SendMSG);
		SendClientMessageToAll(COLOR_WHITE,SendMSGtoall);
		SendClientMessage(targetid,COLOR_WHITE,SendMSGtoguy);
                AdminLevel[playerid] = levelz;
                return 1;
}
	else return 0;
}
But the level is the same than the id i put in! i even put the space at sscanf so it wont take the first param but it does! how to fix it?
Reply
#2

pawn Код:
new targetid,level;
sscanf(params,"dd",targetid,level);
Reply
#3

Oh. oops.
Reply
#4

lolz
Reply
#5

Quote:
Originally Posted by _ELIX_
Посмотреть сообщение
lolz
spamz ?

Quote:
Originally Posted by _ELIX_
Посмотреть сообщение
uh............ i dont know....i had this problem before...i fixed it...then i forgot how

i wish i could help you bro
Don't know? lol don't answer :P its just Offtopic.
thread under this one .!.


Quote:
Originally Posted by _ELIX_
Посмотреть сообщение
Yes - it's called SA:MP! You managed to find the forums, the program can be downloaded from the main website home page. yes!!! he id right.....i fell ike this guy is from MTA......he insults SAMP :@ NUB
Thread under the one,i just said its under US

Thread:is there anything Like MTA? (I mean other programs) [he knew SA-MP] he asked about other programme of MAPPING or Playing like SA-MP Live
dude, read before posting,please..

Quote:
Originally Posted by =WoR=Varth
Посмотреть сообщение
That's use multiple textdraw.
There's TextDraw Editor FS in FS section. Search.
Quote:
Originally Posted by _ELIX_
Посмотреть сообщение
yes he is right
:cluc ker:
Quote:
Originally Posted by =WoR=Varth
Посмотреть сообщение
Stop posting useless shit.
He noticed, someone answered and he said he was right LOL.
STOP !
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)