Help me with this cmd
#1

This command wont work it suppose to give score but it does give score but it gives only me score even when i enter another id

its not sscanf mine is up to date and working fine becuz all ids work like /adgivecash [id] [amount] it works

but this cmd wont work idk why help me plz

not errors or warnings on compile also

Код:
dcmd_givescore(playerid, params[])
{
	new ID;
	new Value;
	new string[128];
    if(sscanf(params,"ui",ID,Value))
	{
	    SendClientMessage(playerid,COLOR_ERROR,"USAGE: /givescore(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 score.",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;
	}
	IncreasePlayerScore(playerid,Value);
	format(string,sizeof(string),"[ADMIN SCORE] Administrator has given you score. Amount: %d.",Value);
	SendClientMessage(ID,COLOR_ADMIN,string);

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

	format(string,sizeof(string),"9[ADMIN SCORE] Administrator %s(%d) has given %s(%d) score. Amount: %d.",PlayerName(playerid),playerid,PlayerName(ID),ID,Value);
	IRC_GroupSay(gGroupAdminID,IRC_ADMINCHANNEL,string);
	return 1;
}
Reply
#2

pawn Код:
IncreasePlayerScore(playerid,Value);
You honestly see nothing wrong with that?

pawn Код:
IncreasePlayerScore(ID,Value);
See the difference?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)