09.08.2014, 21:26
I want this laser system for my VIP,
Enum:
Code of script:
Enum:
Код:
if(AccInfo[playerid][pVip] > 7)
Code of script:
Код:
CMD:laser(playerid, params[]) { if(AccInfo[playerid][pVip] > 7) { return SendClientMessage(playerid,-1,"Sorry this command is for VIP only"); if(pInfo[playerid][Logged] == 0) return SendClientMessage(playerid, COLOR_RED, "[Error]: You must be logged in!"); if(GetPlayerState(playerid) != 1 && GetPlayerState(playerid) != 2 && GetPlayerState(playerid) != 3 && GetPlayerState(playerid) != 7) return SendClientMessage(playerid, COLOR_RED, "[Spawned]: You must be spawned, To use this command!"); ShowPlayerDialog(playerid, DIALOG_LASER, DIALOG_STYLE_LIST, ""white"Laser Colors", "Red\nBlue\nPink\nOrange\nGreen\nYellow", "Select", "Cancel"); SendAdminCMD(playerid, "laser"); return 1; } CMD:laseron(playerid, params[]) { if(AccInfo[playerid][pVip] > 7) { return SendClientMessage(playerid,-1,"Sorry this command is for VIP only"); if(pInfo[playerid][Logged] == 0) return SendClientMessage(playerid, COLOR_RED, "[Error]: You must be logged in!"); PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0); GameTextForPlayer(playerid, "~w~Laser ~g~On", 2500, 3); SetPVarInt(playerid, "laser", 1); SetPVarInt(playerid, "color", GetPVarInt(playerid, "color")); SendAdminCMD(playerid, "laseron"); return 1; } CMD:laseroff(playerid, params[]) { if(AccInfo[playerid][pVip] > 7) { return SendClientMessage(playerid,-1,"Sorry this command is for VIP only"); if(pInfo[playerid][Logged] == 0) return SendClientMessage(playerid, COLOR_RED, "[Error]: You must be logged in!"); PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0); GameTextForPlayer(playerid, "~w~Laser ~r~Off", 2500, 3); SetPVarInt(playerid, "laser", 0); RemovePlayerAttachedObject(playerid, 0); SendAdminCMD(playerid, "laseroff"); return 1; }