Hưỡng Dẫn Làm Lệnh /setvip /baocao cho mode
bất cứ khi nào tôi viết nó trong trò chơi /baocao nó luôn luôn chỉ cho tôi hai lần lệnh này /baocao (playerid) (lý do)
Pawn Code :
CMD:report(playerid, params[]) { if(pInfo[playerid][pLogged] == 1) {
new text[128],targetid,string[128],sendername[MAX_PLAYER_NAME],giveplayer[MAX_PLAYER_NAME]; if(sscanf(params, "us[128]", targetid, text)) SendClientMessage(playerid, COLOR_GREY, "Usage: /report [playerid] [reason]"); else { if (!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_GREY, "Invaild ID - That player is not connected!"); format(sendername, sizeof(sendername), "%s", PlayerName(playerid)); format(giveplayer, sizeof(giveplayer), "%s", PlayerName(targetid)); format(string, sizeof(string), "Report: %s[%d] has reported %s[%d] [Reason: %s]", sendername, playerid, giveplayer, targetid, text); SendMessageToAdmins(COLOR_YELLOW,string); printf("Report: %s[%d] has reported %s[%d] [Reason: %s]", sendername, playerid, giveplayer, targetid, text); SendClientMessage(playerid, COLOR_GREEN,"Thanks for reporting!"); } } else if(pInfo[playerid][pLogged] == 0) { SendClientMessage(playerid,-1,""chat""COL_LIGHTBLUE" Nice try u fucking fag gay!"); printf("%s has been kicked for trying to use a command without being logged in!", PlayerName(playerid)); Kick(playerid); } return 1; }
điều này cũng bất cứ khi nào tôi viết /setvip nó cho thấy tôi thông báo hai lần / setvip (id) (Level)
Pawn Code : CMD:setvip(playerid,params[]) { if(pInfo[playerid][pLogged] == 1) { if(pInfo[playerid][pAdminLevel] >= 6) { new targetid,level,string[256]; if(sscanf(params, "ud", targetid, level)) return SendClientMessage(playerid,-1,""chat" /setdonor [playerid] [level]"); if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid,-1,""chat" Player is not online"); if(level < 0 || level > 5) return SendClientMessage(playerid,-1,""chat" Vip levels are ONLY between 1-5");
pInfo[targetid][pVipLevel] = level;
format(string, sizeof(string), ""chat""COL_LIGHTBLUE" %s %s have given vip status of %d to %s",GetAdminName(playerid),PlayerName(playerid),level,PlayerName(targetid)); SendClientMessageToAll(-1,string); printf(" %s %s have given vip status of %d to %s",GetAdminName(playerid),PlayerName(playerid),level,PlayerName(targetid)); } else { SendClientMessage(playerid,-1,""chat""COL_LIGHTBLUE" You do not have the right admin permissions for this command!"); } } else if(pInfo[playerid][pLogged] == 0) { SendClientMessage(playerid,-1,""chat""COL_LIGHTBLUE" Nice try u fucking fag gay!"); printf("%s has been kicked for trying to use a command without being logged in!", PlayerName(playerid)); Kick(playerid); } return 1; }
|