GivePlayerMoney
#1

I want to add a command that you can set player cash and that money is save on the userfile saves ( i use dudb include )

Quote:

if(strcmp(cmd, "/setmoney", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_RED, "Mayne:/setmoney [playerid/PartOfName] [money]");
return 1;
}
if (PlayerInfo[playerid][pAdmin] >= 1)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(playerid != INVALID_PLAYER_ID)
{
GivePlayerMoney(playerid,PlayerInfo[playerid][pCash]);
SendClientMessage(playerid, COLOR_GREEN, "Money has been set");
}
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "you are not authorized to use that command!");
}
}
return 1;
}

This is my command so far dis is my lates trying but now it wont even give money :P

i am stuck on this command like two days..
Reply


Messages In This Thread
GivePlayerMoney - by Jokerr_mayne - 28.08.2009, 23:05
Re: GivePlayerMoney - by NEW_IE - 28.08.2009, 23:35
Re: GivePlayerMoney - by pomogames - 28.08.2009, 23:46
Re: GivePlayerMoney - by Jokerr_mayne - 28.08.2009, 23:55
Re: GivePlayerMoney - by Jokerr_mayne - 29.08.2009, 00:22
Re: GivePlayerMoney - by Jokerr_mayne - 29.08.2009, 10:50

Forum Jump:


Users browsing this thread: