14.10.2014, 13:29
Code:
new pInfo[MAX_PLAYERS][TPlayerData]; stock Name(playerid) { new Name[128] GetPlayerName(playerid, Name, 128); return name; } stock VIPName(playerid) { new vipname[128]; switch(pInfo[playerid][vStatus]) { case 0: vipname= "Normal"; case 2: vipname= "Bronze V.I.P"; case 3: vipname= "Silver V.I.P"; case 4: vipname= "Gold V.I.P"; } return vipname; } COMMAND:makevip(playerid, params[]) { if(IsPlayerConnected(playerid)) { if(APlayerData[playerid][PlayerLevel] >= 5) { new id, level, n[MAX_PLAYER_NAME], string[126]; if(sscanf(params, "ud", id, level)) return SendClientMessage(playerid, -1, "USAGE: /makevip [playerid] [level]"); pInfo[id][vStatus] = level; format(string, sizeof(string), "%s has set your VIP level %d", n, level); SendClientMessage(id, -1, string); format(string, sizeof(string), "You have set %s VIP level to %d", playerid, level); SendClientMessage(playerid, -1, string); } } return 1; }