28.08.2009, 23:05
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 )
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..
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; } |
i am stuck on this command like two days..