Need to convert this to zcmd
#9

Getting error undefined symbol cmdtext and undefined symbol moneys
Код:
 CMD:charity(playerid, params[])
	{
	    if(IsPlayerConnected(playerid))
	    {
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_WHITE, "USAGE: /charity [amount]");
				return 1;
			}
			moneys = strvalEx(tmp);
			if(moneys < 0)
			{
				SendClientMessage(playerid, COLOR_GRAD1, "   That is not enough !");
				return 1;
			}
			if(PlayerInfo[playerid][pCash] < moneys)
			{
			    SendClientMessage(playerid, COLOR_GRAD1, "   You don't have that much money !");
				return 1;
			}
			PlayerInfo[playerid][pCash] = PlayerInfo[playerid][pCash]-moneys;
			GivePlayerMoney(playerid, -moneys);
			strmid(sendername, PlayerRPName(playerid), 0, MAX_PLAYER_NAME);
			format(string, sizeof(string), "%s Thank you for you donation of $%d.",sendername, moneys);
			SendClientMessage(playerid, COLOR_GRAD1, string);
			PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
			PayLog(string);
		}
		return 1;
	}
Reply


Messages In This Thread
Need to convert this to zcmd - by krytans - 13.07.2014, 13:48
Re: Need to convert this to zcmd - by Konstantinos - 13.07.2014, 13:51
Re: Need to convert this to zcmd - by krytans - 13.07.2014, 14:13
Re: Need to convert this to zcmd - by krytans - 13.07.2014, 14:16
Re: Need to convert this to zcmd - by printer - 13.07.2014, 14:28
Re: Need to convert this to zcmd - by krytans - 13.07.2014, 14:53
Re: Need to convert this to zcmd - by krytans - 13.07.2014, 14:56
Re: Need to convert this to zcmd - by greentarch - 13.07.2014, 14:59
Re: Need to convert this to zcmd - by krytans - 13.07.2014, 15:03

Forum Jump:


Users browsing this thread: 1 Guest(s)