Help with /o cmd. Annoying problem. -
ricardo178 - 15.01.2012
Hello. I am annoyed with /o cmd, because whatever i put in the strings, it always limit the text really much....
You can't even say /o Gello, good morning, welcome to this server. Use /atalk for help.
It cut almost middle sentence... :P
Also, my /equp cmd doesn't work well... It shows the dialog, but doesn't give the things. Something happen to /buywep.
/o code:
pawn Код:
CMD:o(playerid, params[])
{
new text[254];
if(!sscanf(params, "s", text))
{
new string[254], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s: (( %s ))", name, text);
SendClientMessageToAll(COLOR_WHITE, string);
return 1;
}
else return SendClientMessage(playerid, 0xFFFFFF, "USAGE: /o(oc) [Text]");
}
Equip and Buywep code.
pawn Код:
CMD:equip(playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 5.0, 233.4351, 122.8506, 1003.2188))
{
if(PlayerInfo[playerid][Fmember] == 1 || PlayerInfo[playerid][Fleader] == 1)
{
if(lspdduty[playerid] == lspdduty_1)
{
ShowPlayerDialog(playerid, 112, DIALOG_STYLE_LIST, "Equip Menu", " Cadet \n Officer \n Corporal: \n Sergeant \n Lieutenant \n Captain \n Deputy Chief \n Chief ", "Select", "Cancel");
return 1;
}
else return SendClientMessage(playerid, COLOR_NEUTRALBLUE, "You are not on duty.");
}
else return SendClientMessage(playerid, COLOR_NEUTRALBLUE, "You are not part of LSPD.");
}
else return SendClientMessage(playerid, COLOR_NEUTRALBLUE, "You are not in the Lockers.");
}
CMD:buywep(playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 20, 312.9659, -137.4177, 999.6016))
{
ShowPlayerDialog(playerid, 9998, DIALOG_STYLE_LIST, "Arms Shop Ammunation - Market Road Los Santos", "$3500 - AK47 \n$4500 - M4\n$3500 - SawnOff Shotgun\n$1200 - Desert Eagle\n$50 - Bat\n$4000 - Combat Shotgun\n$7000 - Sniper\n$10000 - RPG\n$5000 - Full Armour + Health", "Set", "Close");
return 1;
}
else return SendClientMessage(playerid, 0xFF330000, "You are not in the Ammunation located at Market LS!");
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if (dialogid == 1)
{
new name[MAX_PLAYER_NAME], string[128];
GetPlayerName(playerid, name, sizeof(name));
format(file, sizeof(file), "realityrp/users/%s.ini", name);
if(!response) return Kick(playerid);
if(!strlen(inputtext)) return
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "Hi your not registered", "Welcome, your not registered mate, input your registration pw below", "Register", "Leave");
dini_Create(file);
dini_IntSet(file, "Password", udb_hash(inputtext));
dini_IntSet(file, "AdminLevel",PlayerInfo[playerid][AdminLevel] = 0);
dini_IntSet(file, "Vip",PlayerInfo[playerid][Vip] = 0);
dini_IntSet(file, "Cash",PlayerInfo[playerid][Cash] = 5500);
dini_IntSet(file, "Score",PlayerInfo[playerid][Score] = 0);
dini_IntSet(file, "pJob",PlayerInfo[playerid][pJob] = 13);
dini_IntSet(file, "Color",PlayerInfo[playerid][Color] = 0);
dini_IntSet(file, "Vw",PlayerInfo[playerid][Vw] = 0);
dini_IntSet(file, "Int",PlayerInfo[playerid][Int] = 0);
dini_IntSet(file, "Warns",PlayerInfo[playerid][Warns] = 0);
dini_IntSet(file, "Fleader",PlayerInfo[playerid][Fleader] = 0);
dini_IntSet(file, "Fmember",PlayerInfo[playerid][Fmember] = 0);
dini_IntSet(file, "Frank",PlayerInfo[playerid][Frank] = 0);
dini_IntSet(file, "Bank",PlayerInfo[playerid][Bank] = 0);
dini_IntSet(file, "Prods",PlayerInfo[playerid][Prods] = 0);
dini_IntSet(file, "Skin",PlayerInfo[playerid][Skin] = 7);
dini_IntSet(file, "RepairOffer",PlayerInfo[playerid][RepairOffer] = 0);
dini_IntSet(file, "Credit",PlayerInfo[playerid][Credit] = 0);
dini_IntSet(file, "Materials",PlayerInfo[playerid][Materials] = 0);
format(string, 128, "[SYSTEM]: You succesfully registered the nickname %s with password %s, you have been auto logged in.", name, inputtext);
SendClientMessage(playerid, 0xFF00CC, string);
IsLogged[playerid] = 1;
}
if (dialogid == 2)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(file, sizeof(file), "realityrp/users/%s.ini", name);
if(!response) return Kick(playerid);
if (!strlen(inputtext)) return ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Hi your registered", "You are registred, please login.", "Login", "Leave");
new tmp;
tmp = dini_Int(file, "Password");
if(udb_hash(inputtext) != tmp) {
SendClientMessage(playerid, 0xFF00CC, "Wrong PW sir.");
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Hi your registered", "You are registred, put the password below.", "Login", "Leave");
}
else
{
IsLogged[playerid] = 1;
SetPlayerMoney(playerid, dini_Int(file, "Cash"));
SetPlayerScore(playerid, dini_Int(file, "Score"));
SetPlayerColor(playerid, dini_Int(file, "Color"));
SetPlayerVirtualWorld(playerid, dini_Int(file, "Vw"));
SetPlayerInterior(playerid, dini_Int(file, "Int"));
PlayerInfo[playerid][pJob] = dini_Int(file, "pJob");
PlayerInfo[playerid][Warns] = dini_Int(file, "Warns");
PlayerInfo[playerid][Fleader] = dini_Int(file, "Fleader");
PlayerInfo[playerid][Fmember] = dini_Int(file, "Fmember");
PlayerInfo[playerid][Frank] = dini_Int(file, "Frank");
PlayerInfo[playerid][Bank] = dini_Int(file, "Bank");
PlayerInfo[playerid][Prods] = dini_Int(file, "Prods");
PlayerInfo[playerid][AdminLevel] = dini_Int(file, "AdminLevel");
PlayerInfo[playerid][Vip] = dini_Int(file, "Vip");
PlayerInfo[playerid][RepairOffer] = dini_Int(file, "RepairOffer");
PlayerInfo[playerid][Credit] = dini_Int(file, "Credit");
PlayerInfo[playerid][Materials] = dini_Int(file, "Materials");
SetPlayerSkin(playerid, dini_Int(file, "Skin"));
SendClientMessage(playerid,0xFF00CC, "[SYSTEM]: Successfully logged in!");
}
switch(dialogid)
{
case 112:
{
if(response)
{
switch(listitem)
{
case 0:
{
SendClientMessage(playerid, COLOR_RED, "You did not equip!");
}
case 1:
{
SendClientMessage(playerid, COLOR_RED, "You did not equip!");
}
case 2:
{
SendClientMessage(playerid, COLOR_RED, "You did not equip!");
}
case 3:
{
SendClientMessage(playerid, COLOR_RED, "You did not equip!");
}
case 4:
{
SendClientMessage(playerid, COLOR_RED, "You did not equip!");
}
case 5:
{
SendClientMessage(playerid, COLOR_RED, "You did not equip!");
}
case 6:
{
SendClientMessage(playerid, COLOR_RED, "You did not equip!");
}
case 7:
{
SendClientMessage(playerid, COLOR_RED, "You did not equip!");
}
}
}
else
{
switch(listitem){
case 0:
{
if(PlayerInfo[playerid][Frank] >= 1)
{
SetPlayerSkin(playerid, 71);
GivePlayerWeapon(playerid, 3, 1);
GivePlayerWeapon(playerid, 41, 500);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
}
else return SendClientMessage(playerid, COLOR_NEUTRALBLUE, "You are not a Cadet.");
}
case 1:
{
if(PlayerInfo[playerid][Frank] >= 2)
{
SetPlayerSkin(playerid, 265);
GivePlayerWeapon(playerid, 3, 1);
GivePlayerWeapon(playerid, 41, 600);
GivePlayerWeapon(playerid, 24, 200);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
}
else return SendClientMessage(playerid, COLOR_NEUTRALBLUE, "You are not an Officer.");
}
case 2:
{
if(PlayerInfo[playerid][Frank] >= 3)
{
SetPlayerSkin(playerid, 266);
GivePlayerWeapon(playerid, 3, 1);
GivePlayerWeapon(playerid, 41, 700);
GivePlayerWeapon(playerid, 24, 250);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
}
else return SendClientMessage(playerid, COLOR_NEUTRALBLUE, "You are not a Corporal.");
}
case 3:
{
if(PlayerInfo[playerid][Frank] >= 4)
{
SetPlayerSkin(playerid, 267);
GivePlayerWeapon(playerid, 3, 1);
GivePlayerWeapon(playerid, 41, 1000);
GivePlayerWeapon(playerid, 24, 300);
GivePlayerWeapon(playerid, 26, 250);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
}
else return SendClientMessage(playerid, COLOR_NEUTRALBLUE, "You are not a Sergeant.");
}
case 4:
{
if(PlayerInfo[playerid][Frank] >= 5)
{
SetPlayerSkin(playerid, 280);
GivePlayerWeapon(playerid, 3, 1);
GivePlayerWeapon(playerid, 41, 1000);
GivePlayerWeapon(playerid, 24, 300);
GivePlayerWeapon(playerid, 26, 250);
GivePlayerWeapon(playerid, 29, 500);
GivePlayerWeapon(playerid, 31, 500);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
}
else return SendClientMessage(playerid, COLOR_NEUTRALBLUE, "You are not a Lieutenant.");
}
case 5:
{
if(PlayerInfo[playerid][Frank] >= 6)
{
SetPlayerSkin(playerid, 281);
GivePlayerWeapon(playerid, 3, 1);
GivePlayerWeapon(playerid, 41, 1000);
GivePlayerWeapon(playerid, 24, 300);
GivePlayerWeapon(playerid, 26, 250);
GivePlayerWeapon(playerid, 29, 800);
GivePlayerWeapon(playerid, 31, 700);
GivePlayerWeapon(playerid, 17, 50);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
}
else return SendClientMessage(playerid, COLOR_NEUTRALBLUE, "You are not a Captain.");
}
case 6:
{
if(PlayerInfo[playerid][Frank] >= 7)
{
SetPlayerSkin(playerid, 283);
GivePlayerWeapon(playerid, 3, 1);
GivePlayerWeapon(playerid, 41, 1000);
GivePlayerWeapon(playerid, 24, 300);
GivePlayerWeapon(playerid, 26, 250);
GivePlayerWeapon(playerid, 29, 800);
GivePlayerWeapon(playerid, 31, 700);
GivePlayerWeapon(playerid, 17, 50);
GivePlayerWeapon(playerid, 34, 100);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
}
else return SendClientMessage(playerid, COLOR_NEUTRALBLUE, "You are not a Deputy Chief.");
}
case 7:
{
if(PlayerInfo[playerid][Fleader] == 1)
{
SetPlayerSkin(playerid, 282);
GivePlayerWeapon(playerid, 3, 1);
GivePlayerWeapon(playerid, 41, 1000);
GivePlayerWeapon(playerid, 24, 300);
GivePlayerWeapon(playerid, 26, 250);
GivePlayerWeapon(playerid, 29, 800);
GivePlayerWeapon(playerid, 31, 700);
GivePlayerWeapon(playerid, 17, 50);
GivePlayerWeapon(playerid, 34, 100);
GivePlayerWeapon(playerid, 16, 70);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
}
else return SendClientMessage(playerid, COLOR_NEUTRALBLUE, "You are not a Chief.");
}
}
}
}
}
switch(dialogid)
{
case 9998:
{
if(!response) return SendClientMessage(playerid, 0xFF330000, "You did not buy a gun! Visit again anytime soon!");
switch(listitem)
{
case 0:
{
{
{
GivePlayerWeapon(playerid, 30, 500);
GivePlayerMoneyEx(playerid, -3500);
SendClientMessage(playerid, 0xFF330000, "You bought an Assault Rifle: AK47");
}
}
return 1;
}
case 1:
{
{
{
GivePlayerWeapon(playerid, 31, 500);
GivePlayerMoneyEx(playerid, -4500);
SendClientMessage(playerid, 0xFF330000, "You bought an Assault Rifle: M4");
}
}
return 1;
}
case 2:
{
{
{
GivePlayerWeapon(playerid, 26, 50);
GivePlayerMoneyEx(playerid, -3500);
SendClientMessage(playerid, 0xFF330000, "You bought a shotgun: SawnOff Shotgun");
}
}
return 1;
}
case 3:
{
{
{
GivePlayerWeapon(playerid, 5, 1);
GivePlayerMoneyEx(playerid, -50);
SendClientMessage(playerid, 0xFF330000, "You bought a melee weapon: Baseball Bat");
}
}
return 1;
}
case 4:
{
{
{
GivePlayerWeapon(playerid, 24, 250);
GivePlayerMoneyEx(playerid, -1200);
SendClientMessage(playerid, 0xFF330000, "You bought a pistol: Desert Eagle");
}
}
return 1;
}
case 5:
{
{
{
GivePlayerWeapon(playerid, 34, 50);
GivePlayerMoneyEx(playerid, -7000);
SendClientMessage(playerid, 0xFF330000, "You bought a Stealth Weapon: Sniper Rifle");
}
}
return 1;
}
case 6:
{
{
{
GivePlayerWeapon(playerid, 35, 6);
GivePlayerMoneyEx(playerid, -10000);
SendClientMessage(playerid, 0xFF330000, "You bought an Explosive Weapon: Rocket Launcher/RPG");
}
}
return 1;
}
case 7:
{
{
{
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
GivePlayerMoneyEx(playerid, -5000);
SendClientMessage(playerid, 0xFF330000, "You bought Armour and used a Med Pack");
}
}
return 1;
}
}
}
}
return 1;
}
return 1;
}
Thank you really much.. I tried all, and nothing work.
Re: Help with /o cmd. Annoying problem. -
Soumi - 15.01.2012
For the /o command.
pawn Код:
CMD:o(playerid, params[])
{
new text[254];
if(!sscanf(params, "s[254]", text))
{
new string[254], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s: (( %s ))", name, text);
SendClientMessageToAll(COLOR_WHITE, string);
return 1;
}
else return SendClientMessage(playerid, 0xFFFFFF, "USAGE: /o(oc) [Text]");
}
Try this.
EDIT: Just saw your /equip and /buyweap cmd, In OnDialogResponse, you used if (dialogid == 1) and if (dialogid == 2) then you changed it to a switch for the equip and buyweap dialogs, try making them like the others (Example: if(dialogid == 999
for the buyweap cmd then insert your code)
Re: Help with /o cmd. Annoying problem. -
milanosie - 15.01.2012
hm...
The dialog is a weird one:/
Re : Help with /o cmd. Annoying problem. -
ricardo178 - 15.01.2012
Now it work, but /equip gives /buywep guns...
About /o, Unknown cmd...
xD :P
Also /r, only leader see it.
The code of /r is:
pawn Код:
CMD:r(playerid, params[])
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(PlayerInfo[i][Fmember] == 1 || PlayerInfo[i][Fleader] == 1)
{
new text[258];
if(!sscanf(params, "s", text))
{
new name[MAX_PLAYER_NAME], string[258];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s (radio): %s , Over.", name, text);
SendClientMessage(i, TEAM_RADIO_COLOR, string);
return 1;
}
else return SendClientMessage(playerid, COLOR_RED, "USAGE: /r [Text]");
}
}
return 0;
}
Thank you for all help.
Re: Help with /o cmd. Annoying problem. -
Konstantinos - 15.01.2012
pawn Код:
#include <a_samp>
#include <zcmd>
// This way is better!
CMD:o(playerid, params[])
{
if(!isnull(params)) return SendClientMessage(playerid, 0xFFFFFF, "USAGE: /o(oc) [Text]");
new
string[ 254 ], name[ MAX_PLAYER_NAME ];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s: (( %s ))", name, params);
return SendClientMessageToAll(COLOR_WHITE, string);
}
// Also, you can make it with your way by fixing this line
if(!sscanf(params, "s[256]", text))
// But I believe that [ 128 ] is enough
pawn Код:
// Be sure you return the correct value. Depends on what do you use Gamemode or FS.
// However, you had some mistakes. On this ->
/*
if(!response)
{
switch(listitem) {
// Code
}
}
That's wrong!
*/
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid) {
case 1:
{
new name[MAX_PLAYER_NAME], string[128];
GetPlayerName(playerid, name, sizeof(name));
format(file, sizeof(file), "realityrp/users/%s.ini", name);
if(!response) return Kick(playerid);
if(response) {
if(!strlen(inputtext)) return ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "Hi your not registered", "Welcome, your not registered mate, input your registration pw below", "Register", "Leave");
dini_Create(file);
dini_IntSet(file, "Password", udb_hash(inputtext));
dini_IntSet(file, "AdminLevel",PlayerInfo[playerid][AdminLevel] = 0);
dini_IntSet(file, "Vip",PlayerInfo[playerid][Vip] = 0);
dini_IntSet(file, "Cash",PlayerInfo[playerid][Cash] = 5500);
dini_IntSet(file, "Score",PlayerInfo[playerid][Score] = 0);
dini_IntSet(file, "pJob",PlayerInfo[playerid][pJob] = 13);
dini_IntSet(file, "Color",PlayerInfo[playerid][Color] = 0);
dini_IntSet(file, "Vw",PlayerInfo[playerid][Vw] = 0);
dini_IntSet(file, "Int",PlayerInfo[playerid][Int] = 0);
dini_IntSet(file, "Warns",PlayerInfo[playerid][Warns] = 0);
dini_IntSet(file, "Fleader",PlayerInfo[playerid][Fleader] = 0);
dini_IntSet(file, "Fmember",PlayerInfo[playerid][Fmember] = 0);
dini_IntSet(file, "Frank",PlayerInfo[playerid][Frank] = 0);
dini_IntSet(file, "Bank",PlayerInfo[playerid][Bank] = 0);
dini_IntSet(file, "Prods",PlayerInfo[playerid][Prods] = 0);
dini_IntSet(file, "Skin",PlayerInfo[playerid][Skin] = 7);
dini_IntSet(file, "RepairOffer",PlayerInfo[playerid][RepairOffer] = 0);
dini_IntSet(file, "Credit",PlayerInfo[playerid][Credit] = 0);
dini_IntSet(file, "Materials",PlayerInfo[playerid][Materials] = 0);
format(string, 128, "[SYSTEM]: You succesfully registered the nickname %s with password %s, you have been auto logged in.", name, inputtext);
SendClientMessage(playerid, 0xFF00CC, string);
IsLogged[playerid] = 1;
}
}
case 2:
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(file, sizeof(file), "realityrp/users/%s.ini", name);
if(!response) return Kick(playerid);
if(response) {
if(!strlen(inputtext)) return ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Hi your registered", "You are registred, please login.", "Login", "Leave");
new tmp;
tmp = dini_Int(file, "Password");
if(udb_hash(inputtext) != tmp) {
SendClientMessage(playerid, 0xFF00CC, "Wrong PW sir.");
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Hi your registered", "You are registred, put the password below.", "Login", "Leave");
}
else {
IsLogged[playerid] = 1;
SetPlayerMoney(playerid, dini_Int(file, "Cash"));
SetPlayerScore(playerid, dini_Int(file, "Score"));
SetPlayerColor(playerid, dini_Int(file, "Color"));
SetPlayerVirtualWorld(playerid, dini_Int(file, "Vw"));
SetPlayerInterior(playerid, dini_Int(file, "Int"));
PlayerInfo[playerid][pJob] = dini_Int(file, "pJob");
PlayerInfo[playerid][Warns] = dini_Int(file, "Warns");
PlayerInfo[playerid][Fleader] = dini_Int(file, "Fleader");
PlayerInfo[playerid][Fmember] = dini_Int(file, "Fmember");
PlayerInfo[playerid][Frank] = dini_Int(file, "Frank");
PlayerInfo[playerid][Bank] = dini_Int(file, "Bank");
PlayerInfo[playerid][Prods] = dini_Int(file, "Prods");
PlayerInfo[playerid][AdminLevel] = dini_Int(file, "AdminLevel");
PlayerInfo[playerid][Vip] = dini_Int(file, "Vip");
PlayerInfo[playerid][RepairOffer] = dini_Int(file, "RepairOffer");
PlayerInfo[playerid][Credit] = dini_Int(file, "Credit");
PlayerInfo[playerid][Materials] = dini_Int(file, "Materials");
SetPlayerSkin(playerid, dini_Int(file, "Skin"));
SendClientMessage(playerid,0xFF00CC, "[SYSTEM]: Successfully logged in!");
}
}
}
case 112:
{
if(!response) return SendClientMessage(playerid, COLOR_RED, "You did not equip!");
if(response) {
switch(listitem) {
case 0:
{
if(PlayerInfo[playerid][Frank] >= 1) {
SetPlayerSkin(playerid, 71);
GivePlayerWeapon(playerid, 3, 1);
GivePlayerWeapon(playerid, 41, 500);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
}
else return SendClientMessage(playerid, COLOR_NEUTRALBLUE, "You are not a Cadet.");
}
case 1:
{
if(PlayerInfo[playerid][Frank] >= 2) {
SetPlayerSkin(playerid, 265);
GivePlayerWeapon(playerid, 3, 1);
GivePlayerWeapon(playerid, 41, 600);
GivePlayerWeapon(playerid, 24, 200);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
}
else return SendClientMessage(playerid, COLOR_NEUTRALBLUE, "You are not an Officer.");
}
case 2:
{
if(PlayerInfo[playerid][Frank] >= 3) {
SetPlayerSkin(playerid, 266);
GivePlayerWeapon(playerid, 3, 1);
GivePlayerWeapon(playerid, 41, 700);
GivePlayerWeapon(playerid, 24, 250);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
}
else return SendClientMessage(playerid, COLOR_NEUTRALBLUE, "You are not a Corporal.");
}
case 3:
{
if(PlayerInfo[playerid][Frank] >= 4) {
SetPlayerSkin(playerid, 267);
GivePlayerWeapon(playerid, 3, 1);
GivePlayerWeapon(playerid, 41, 1000);
GivePlayerWeapon(playerid, 24, 300);
GivePlayerWeapon(playerid, 26, 250);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
}
else return SendClientMessage(playerid, COLOR_NEUTRALBLUE, "You are not a Sergeant.");
}
case 4:
{
if(PlayerInfo[playerid][Frank] >= 5) {
SetPlayerSkin(playerid, 280);
GivePlayerWeapon(playerid, 3, 1);
GivePlayerWeapon(playerid, 41, 1000);
GivePlayerWeapon(playerid, 24, 300);
GivePlayerWeapon(playerid, 26, 250);
GivePlayerWeapon(playerid, 29, 500);
GivePlayerWeapon(playerid, 31, 500);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
}
else return SendClientMessage(playerid, COLOR_NEUTRALBLUE, "You are not a Lieutenant.");
}
case 5:
{
if(PlayerInfo[playerid][Frank] >= 6) {
SetPlayerSkin(playerid, 281);
GivePlayerWeapon(playerid, 3, 1);
GivePlayerWeapon(playerid, 41, 1000);
GivePlayerWeapon(playerid, 24, 300);
GivePlayerWeapon(playerid, 26, 250);
GivePlayerWeapon(playerid, 29, 800);
GivePlayerWeapon(playerid, 31, 700);
GivePlayerWeapon(playerid, 17, 50);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
}
else return SendClientMessage(playerid, COLOR_NEUTRALBLUE, "You are not a Captain.");
}
case 6:
{
if(PlayerInfo[playerid][Frank] >= 7) {
SetPlayerSkin(playerid, 283);
GivePlayerWeapon(playerid, 3, 1);
GivePlayerWeapon(playerid, 41, 1000);
GivePlayerWeapon(playerid, 24, 300);
GivePlayerWeapon(playerid, 26, 250);
GivePlayerWeapon(playerid, 29, 800);
GivePlayerWeapon(playerid, 31, 700);
GivePlayerWeapon(playerid, 17, 50);
GivePlayerWeapon(playerid, 34, 100);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
}
else return SendClientMessage(playerid, COLOR_NEUTRALBLUE, "You are not a Deputy Chief.");
}
case 7:
{
if(PlayerInfo[playerid][Fleader] == 1) {
SetPlayerSkin(playerid, 282);
GivePlayerWeapon(playerid, 3, 1);
GivePlayerWeapon(playerid, 41, 1000);
GivePlayerWeapon(playerid, 24, 300);
GivePlayerWeapon(playerid, 26, 250);
GivePlayerWeapon(playerid, 29, 800);
GivePlayerWeapon(playerid, 31, 700);
GivePlayerWeapon(playerid, 17, 50);
GivePlayerWeapon(playerid, 34, 100);
GivePlayerWeapon(playerid, 16, 70);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
}
else return SendClientMessage(playerid, COLOR_NEUTRALBLUE, "You are not a Chief.");
}
}
}
}
case 9998:
{
if(!response) return SendClientMessage(playerid, 0xFF330000, "You did not buy a gun! Visit again anytime soon!");
switch(listitem) {
case 0:
{
GivePlayerWeapon(playerid, 30, 500);
GivePlayerMoneyEx(playerid, -3500);
SendClientMessage(playerid, 0xFF330000, "You bought an Assault Rifle: AK47");
return 1;
}
case 1:
{
GivePlayerWeapon(playerid, 31, 500);
GivePlayerMoneyEx(playerid, -4500);
SendClientMessage(playerid, 0xFF330000, "You bought an Assault Rifle: M4");
return 1;
}
case 2:
{
GivePlayerWeapon(playerid, 26, 50);
GivePlayerMoneyEx(playerid, -3500);
SendClientMessage(playerid, 0xFF330000, "You bought a shotgun: SawnOff Shotgun");
return 1;
}
case 3:
{
GivePlayerWeapon(playerid, 5, 1);
GivePlayerMoneyEx(playerid, -50);
SendClientMessage(playerid, 0xFF330000, "You bought a melee weapon: Baseball Bat");
return 1;
}
case 4:
{
GivePlayerWeapon(playerid, 24, 250);
GivePlayerMoneyEx(playerid, -1200);
SendClientMessage(playerid, 0xFF330000, "You bought a pistol: Desert Eagle");
return 1;
}
case 5:
{
GivePlayerWeapon(playerid, 34, 50);
GivePlayerMoneyEx(playerid, -7000);
SendClientMessage(playerid, 0xFF330000, "You bought a Stealth Weapon: Sniper Rifle");
return 1;
}
case 6:
{
GivePlayerWeapon(playerid, 35, 6);
GivePlayerMoneyEx(playerid, -10000);
SendClientMessage(playerid, 0xFF330000, "You bought an Explosive Weapon: Rocket Launcher/RPG");
return 1;
}
case 7:
{
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
GivePlayerMoneyEx(playerid, -5000);
SendClientMessage(playerid, 0xFF330000, "You bought Armour and used a Med Pack");
return 1;
}
}
}
}
return 1;
}