Help me.
#1

Quote:

CMD:buyweapon(playerid, params[])
{
if(!IsAtammoshop(playerid))
{
SendClientMessage(playerid, COLOR_GREY, " You are not in a Ammunation Shop");
return 1;
}
else
{
ShowPlayerDialog(playerid, AMMOSTOREMENU, DIALOG_STYLE_LIST, "Ammunation Shop", "Pump-Shotgun (5000)\nDeagle Eagle (35000)\nVest (3000))", "Buy", "Cancel");
}
return 1;
}

Quote:

pFireArmsLic

I want make it restricted just who got a weapon licenses can buy.
Reply
#2

No one?
Reply
#3

i Think this One Should Work.

PHP код:
CMD:buyweapon(playeridparams[])
{
if(!
IsAtammoshop(playerid))
{
SendClientMessage(playeridCOLOR_GREY" You are not in a Ammunation Shop");
return 
1;
}
else if(
Player[playerid][pFireArmsLic]==1)
{
ShowPlayerDialog(playeridAMMOSTOREMENUDIALOG_STYLE_LIST"Ammunation Shop""Pump-Shotgun (5000)\nDeagle Eagle (35000)\nVest (3000))""Buy""Cancel");
}
return 
1;

Reply
#4

And also you need change withyou player enum variables to get it working, if you get any errors when post here.
Reply
#5

Quote:

SC-RP\gamemodes\SouthcarolinaRP.pwn(9276) : error 017: undefined symbol "Player"
SC-RP\gamemodes\SouthcarolinaRP.pwn(9276) : warning 215: expression has no effect
SC-RP\gamemodes\SouthcarolinaRP.pwn(9276) : error 001: expected token: ";", but found "]"
SC-RP\gamemodes\SouthcarolinaRP.pwn(9276) : error 029: invalid expression, assumed zero
SC-RP\gamemodes\SouthcarolinaRP.pwn(9276) : fatal error 107: too many error messages on one line

4 Errors.

lawl
Reply
#6

CMD:buyweapon(playerid, params[])
{
if(!IsAtammoshop(playerid))
{
SendClientMessage(playerid, COLOR_GREY, " You are not in a Ammunation Shop");
return 1;
}
else if({variable for weapon license} == 0) return SendClientMessage(playerid, -1, "You don't have a weapon license.");
else
{
ShowPlayerDialog(playerid, AMMOSTOREMENU, DIALOG_STYLE_LIST, "Ammunation Shop", "Pump-Shotgun (5000)\nDeagle Eagle (35000)\nVest (3000))", "Buy", "Cancel");
}
return 1;
}
Reply
#7

pawn Код:
CMD:buyweapon(playerid, params[])
{
     if(!IsAtammoshop(playerid)) return SendClientMessage(playerid, COLOR_GREY, " You are not in a Ammunation Shop");
     if(!PlayerInfo[playerid][pFireArmsLic]) return 0;
     ShowPlayerDialog(playerid, AMMOSTOREMENU, DIALOG_STYLE_LIST, "Ammunation Shop", "Pump-Shotgun (5000)\nDeagle Eagle (35000)\nVest (3000))", "Buy", "Cancel");
     return 1;
}
Reply
#8

Quote:
Originally Posted by MacT
Посмотреть сообщение
And also you need change withyou player enum variables to get it working, if you get any errors when post here.
You need to Do That To Fix your Errors if you want to use my codes.
Reply
#9

Quote:
Originally Posted by Simoer
Посмотреть сообщение
I want make it restricted just who got a weapon licenses can buy.
Do you have a variable for weapon licenses?
Reply
#10

Quote:

CMD:buyweapon(playerid, params[])
{
if(!IsAtammoshop(playerid))
{
SendClientMessage(playerid, COLOR_GREY, " You are not in a Ammunation Shop");
return 1;
}
else if({variable for weapon license} == 0) return SendClientMessage(playerid, -1, "You don't have a weapon license.");
else
{
ShowPlayerDialog(playerid, AMMOSTOREMENU, DIALOG_STYLE_LIST, "Ammunation Shop", "Pump-Shotgun (5000)\nDeagle Eagle (35000)\nVest (3000))", "Buy", "Cancel");
}
return 1;
}

Thank you..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)