CMD:prize(playerid,params[]) { if(!IsPlayerAdmin(playerid))return SendClientMessage(playerid, COLOR_ERROR,"[ERROR]:you are not rcon admin"); new targetid,str[75],ammount,pname[MAX_PLAYER_NAME]; GetPlayerName(targetid); if(sscanf(params,"ud",targetid,ammount)) return SendClientMessage(playerid,COLOR_ERROR,"[ERROR]:Usage(playerid)/[Prize Money]"); if(playerid == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_ERROR, "[ERROR]:Player is not connected."); if(ammount < 1000000 || ammount > 3000000) return SendClientMessage(playerid,COLOR_ERROR,"Invalid ammount Range's Are 1million to 3million"); GetPlayerMoney(targetid); GivePlayerMoney(targetid,ammount) format(str,sizeof(str), "You Have Recived (%d) prize money by a admin",ammount); // error line! SendClientMessage(playerid,COLOR_CYAN,str); format(str,sizeof(str), "you have given %d prizemoney to (%i)",ammount,targetid); SendClientMessage(targetid,COLOR_CYAN,str); return 1; }
GivePlayerMoney(targetid,ammount);
U are missing ; on this line |
CMD:prize(playerid,params[]) { if(!IsPlayerAdmin(playerid))return SendClientMessage(playerid, COLOR_ERROR,"[ERROR]:you are not rcon admin"); new targetid,str[75],ammount,pname[MAX_PLAYER_NAME]; if(sscanf(params,"ud",targetid,ammount)) return SendClientMessage(playerid,COLOR_ERROR,"[ERROR]:Usage(playerid)/[Prize Money]"); if(playerid == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_ERROR, "[ERROR]:Player is not connected."); if(ammount < 1000000 || ammount > 3000000) return SendClientMessage(playerid,COLOR_ERROR,"Invalid ammount Range's Are 1million to 3million"); GetPlayerName(targetid, pname, sizeof(pname)); GivePlayerMoney(targetid, + ammount); format(str,sizeof(str), "You Have Recived (%d) prize money by a admin",ammount); SendClientMessage(playerid,COLOR_CYAN,str); format(str,sizeof(str), "you have given %d prizemoney to %s(%i)",ammount, pname, targetid); SendClientMessage(targetid,COLOR_CYAN,str); return 1; }
Код:
CMD:prize(playerid,params[]) { if(!IsPlayerAdmin(playerid))return SendClientMessage(playerid, COLOR_ERROR,"[ERROR]:you are not rcon admin"); new targetid,str[75],ammount,pname[MAX_PLAYER_NAME]; if(sscanf(params,"ud",targetid,ammount)) return SendClientMessage(playerid,COLOR_ERROR,"[ERROR]:Usage(playerid)/[Prize Money]"); if(playerid == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_ERROR, "[ERROR]:Player is not connected."); if(ammount < 1000000 || ammount > 3000000) return SendClientMessage(playerid,COLOR_ERROR,"Invalid ammount Range's Are 1million to 3million"); GetPlayerName(targetid, pname, sizeof(pname)); GivePlayerMoney(targetid, + ammount); format(str,sizeof(str), "You Have Recived (%d) prize money by a admin",ammount); SendClientMessage(playerid,COLOR_CYAN,str); format(str,sizeof(str), "you have given %d prizemoney to %s(%i)",ammount, pname, targetid); SendClientMessage(targetid,COLOR_CYAN,str); return 1; } |