Cmd not working
#1

my cmd wont work it will work but it wont give any robskill if i try to give 5 it gives 0 any amount i try it gives 0
and it wont set the robskill can someone please help also this is stevo's127 cnr script

CODE
Код:
dcmd_setrob(playerid,params[])
{
	new ID;
	new amount;
	new string[128];
    if(sscanf(params,"ui",ID,RobSkill))
	{
	    SendClientMessage(playerid,COLOR_ERROR,"USAGE: /setrob) (Player Name/ID) (Amount)");
	    return 1;
	}
	if(IsSpawned[ID] == 0)
	{
	    format(string,sizeof(string),"%s(%d) is must be alive and spawned in order to give them robskill.",PlayerName(ID),ID);
	    SendClientMessage(playerid,COLOR_ERROR,string);
	    return 1;
	}
	if(!IsPlayerConnected(ID))
	{
	    format(string,sizeof(string),"The Player ID (%d) is not connected to the server.",ID);
	    SendClientMessage(playerid,COLOR_ERROR,string);
	    return 1;
	}
	RobSkill[playerid] = amount;
	format(string,sizeof(string),"[ADMIN Robskill] Administrator has given you Robskill. Amount: %d.",amount);
	SendClientMessage(ID,COLOR_ADMIN,string);

	format(string,sizeof(string),"[ADMIN Robskill] You have given %s(%d) Robskill. Amount: %d.",PlayerName(ID),ID,amount);
	SendClientMessage(playerid,COLOR_ADMIN,string);

	format(string,sizeof(string),"9[ADMIN Robskill] Administrator %s(%d) has set %s(%d) robskill. Amount: %d.",PlayerName(playerid),playerid,PlayerName(ID),ID,amount);
	IRC_GroupSay(gGroupAdminID,IRC_ADMINCHANNEL,string);
	return 1;
}
Reply


Messages In This Thread
Cmd not working - by San1 - 10.06.2012, 20:45
Re: Cmd not working - by Revo - 10.06.2012, 20:47
Re: Cmd not working - by San1 - 10.06.2012, 20:51
Re: Cmd not working - by Kirollos - 10.06.2012, 22:29
Re: Cmd not working - by Randy More - 10.06.2012, 22:36
Re: Cmd not working - by San1 - 10.06.2012, 22:41
Re: Cmd not working - by Randy More - 10.06.2012, 22:43

Forum Jump:


Users browsing this thread: 1 Guest(s)