18.10.2014, 12:47
You're creating an array which isn't needed here.
If don't want to remove, then just use single variable.
But I prefer to use #define here.
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/givemoney", cmdtext, true, 10) == 0)
{
new string[100];
GivePlayerMoney(playerid, 1000);
format(string,sizeof(string),"[Info] You get %d !",ConvertPrice(1000, 1));
SendClientMessage(playerid, -1, string);
return 1;
}
return 0;
}
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/givemoney", cmdtext, true, 10) == 0)
{
new cash = 1000, string[100];
GivePlayerMoney(playerid, cash);
format(string,sizeof(string),"[Info] You get %d !",ConvertPrice(cash, 1));
SendClientMessage(playerid, -1, string);
return 1;
}
return 0;
}