12.02.2013, 19:11
Код:
CMD:setvip(playerid, params[]) { if(!IsPlayerAdmin(playerid))return 0; if(sscanf(params,"ui",ID,levels)) return SendClientMessage(playerid,0xFF9900AA, "Използване: /setvip [ID] [Level 1-6]");//it will show this if you dont use the format properly if(levels > 6) return SendClientMessage(playerid,0xFF0000FF,"VIP Левели от 1-6!");//Available levels if(!IsPlayerConnected(ID))return SendClientMessage(playerid, 0xFF0000FF ,"Играча не се е вклучил.");//Detect if the id/partofname is connected if(PlayerData[ID][VipLevel] == levels) return SendClientMessage(playerid,0xEE3B3B, "Този играч вече има този левел!");//Detect if the guy is already the level you setted GetPlayerName(ID,pname,MAX_PLAYER_NAME);//define the other person name if(levels == 0) { format(str, sizeof(str),"%s смени твоят vip левел на %d!",Nam,levels); SendClientMessage(ID,0xFF9900AA,str); format(str, sizeof(str),"Беше ти сложен от %s VIP левел на %d!",pname,levels); SendClientMessage(playerid,0xFF9900AA,str); PlayerData[ID][VipLevel] = levels; return 1; } format(str, sizeof(str),"%s направи твоя vip левел на %d.",Nam,levels); SendClientMessage(ID,0xFF9900AA,str); format(str, sizeof(str),"Ти сложи на %s vip левел на %d!",pname,levels); SendClientMessage(playerid,0xFF9900AA,str); PlayerData[ID][VipLevel] = levels; return 1; }
?Help