SA-MP Forums Archive
Help witht his cmd - 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: Help witht his cmd (/showthread.php?tid=351760)



Help witht his cmd - San1 - 17.06.2012

my cmd is working fine like this but those errors are so annoying - i tried many other way like robskill before amount

but it only works when i do it like this but the warnings is soo annoying can someone help out

Код:
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 set their 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;
	}
	amount = RobSkill[ID];
	format(string,sizeof(string),"[ADMIN Robskill] Administrator has given you Robskill. Amount: %d.",RobSkill);
	SendClientMessage(ID,COLOR_ADMIN,string);

	format(string,sizeof(string),"[ADMIN Robskill] You have given %s(%d) Robskill. Amount: %d.",PlayerName(ID),ID,RobSkill);
	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,RobSkill);
	IRC_GroupSay(gGroupAdminID,IRC_ADMINCHANNEL,string);
	return 1;
}



Re: Help witht his cmd - doreto - 17.06.2012

and the waring/erros was ..... ?


Re: Help witht his cmd - San1 - 17.06.2012

FIXED NVM sorry wasting yall time