Error with command
#1

This is the script:
stock givescore(playerid, ammount)
{
new currentscore;
currentscore = GetPlayerScore(playerid);
SetPlayerScore(playerid, GetPlayerScore(playerid)+ammount);
}

new bool:Milestone[MAX_PLAYERS];

public OnPlayerConnect(playerid)
{
Milestone[playerid] = false;
return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/milestone1", cmdtext, true, 10) == 0)
if(GetPlayerMoney(playerid) >= 10000)
{
givescore(playerid, 10);
if(Milestone[playerid]) return SendClientMessage(playerid, -1, "Tu jau atsiemėi љį milestone.");
return 1;
}
return 0;
}


It should let player use this command only one time, but it shows that there is no such command and player can use it how much they want, and it always adds score. Any suggestions?
Reply


Messages In This Thread
Error with command - by VirtasVarsketis - 21.09.2015, 11:59
Re: Error with command - by IceBilizard - 21.09.2015, 12:22
Re: Error with command - by VirtasVarsketis - 21.09.2015, 12:29
Re: Error with command - by saffierr - 21.09.2015, 12:30
Re: Error with command - by IceBilizard - 21.09.2015, 12:36
Re: Error with command - by VirtasVarsketis - 21.09.2015, 12:37
Re: Error with command - by IceBilizard - 21.09.2015, 12:40
Re: Error with command - by VirtasVarsketis - 21.09.2015, 12:41
Re: Error with command - by IceBilizard - 21.09.2015, 12:47
Re: Error with command - by VirtasVarsketis - 21.09.2015, 12:50

Forum Jump:


Users browsing this thread: 1 Guest(s)