function doesn't effect
#1

PHP код:
CMD:scorefall(playeridparams[])
{
if(
Dead[playerid] == 1) return SendClientMessage(playeridCOLOR_RED"[INFO] You can't use commands while being dead!");
new 
value;
if(
PlayerInfo[playerid][pAdmin] <= 2) return SendClientMessage(playeridCOLOR_RED"ERROR: Insufficient Permissions!");
if(
sscanf(params"d"value)) return SendClientMessage(playeridCOLOR_LIGHTGREEN"Usage: /Scorefall [Amount]");
if(
value <= 0) return SendClientMessage(playeridCOLOR_RED"Invalid Amount!");
for(new 
i=0i<MAX_PLAYERSi++)
{
if(
IsPlayerConnected(i))
{
new 
name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
new 
string[128];
format(string,sizeof(string),"Admin %s has given all players %d Score.",namevalue);
SendClientMessageToAll(COLOR_YELLOW,string);
SetPlayerScore(iGetPlayerScore(i) + value);
new 
string2[128];
format(string2,sizeof(string2),"~h~scoref all~n~~h~+%d score",value);
GameTextForAll(string2,3000,3);
return 
1;
}
}
return 
0;

The command I've made is making a gametextforall and it does send the string but none of the players is getting the score.

If someone could fix the code I'll be thankful

""FIXED"" thanks for all
Reply


Messages In This Thread
function doesn't effect - by rakinz - 09.02.2017, 20:32
Re: function doesn't effect - by Macronix - 09.02.2017, 20:43
Re: function doesn't effect - by iLearner - 09.02.2017, 20:47
Re: function doesn't effect - by rakinz - 10.02.2017, 15:15
Re: function doesn't effect - by iLearner - 10.02.2017, 15:32
Re: function doesn't effect - by rakinz - 10.02.2017, 15:38
Re: function doesn't effect - by Macronix - 10.02.2017, 15:55
Re: function doesn't effect - by rakinz - 10.02.2017, 16:31

Forum Jump:


Users browsing this thread: 1 Guest(s)