public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/wlist"))
{
if(IsPlayerInRangeOfPoint(playerid, 7.0, 1367.9517,-1279.9250,13.5469))
{
SendClientMessage(playerid,0xFFFFFFFF,"Go to Ammunation entrace if you wish to buy guns.");
ShowPlayerDialog(playerid, 67, DIALOG_STYLE_LIST, "Weapon shop", "Armour - 7000$\nChainsaw - 50000$\nGrenade - 7500$\nMolotov Cocktail - 5500$\nDesert Eagle - 8500$\nSawnoff Shotgun - 10000$\nCombat Shotgun - 8000$\nUzi - 5000$\nTec-9 - 5000$\nMP5 - 7000$\nM4A1 - 15000$\nAK47 - 13000$\nSniper Rifle - 20000$\nRPG - 350000$\nFlamethower - 250000$\nSatchel Charge - 150000$\nFire Extinguisher - 10000$\nThermal Goggles - 5000$\nParachute - 1000$\nHealth - 5000$", "Buy", "Cancel");
}
return 1;
}
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 67)
{
if(!response)
return 1;
switch(listitem)
{
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/wlist"))
{
if(IsPlayerInRangeOfPoint(playerid, 7.0, 1367.9517,-1279.9250,13.5469)) //This checks if they're inside the point
{
//You had the message here assuming the player WAS infact inside the point
ShowPlayerDialog(playerid, 67, DIALOG_STYLE_LIST, "Weapon shop", "Armour - 7000$\nChainsaw - 50000$\nGrenade - 7500$\nMolotov Cocktail - 5500$\nDesert Eagle - 8500$\nSawnoff Shotgun - 10000$\nCombat Shotgun - 8000$\nUzi - 5000$\nTec-9 - 5000$\nMP5 - 7000$\nM4A1 - 15000$\nAK47 - 13000$\nSniper Rifle - 20000$\nRPG - 350000$\nFlamethower - 250000$\nSatchel Charge - 150000$\nFire Extinguisher - 10000$\nThermal Goggles - 5000$\nParachute - 1000$\nHealth - 5000$", "Buy", "Cancel");
}
else SendClientMessage(playerid,0xFFFFFFFF,"Go to Ammunation entrace if you wish to buy guns."); //This will show the message if the player isn't inside the point
return 1;
}
return 0;
}
CMD:detonate(playerid, params[])
{
new Float:X,Float:Y,Float:Z;
if(DetonateBomb[playerid] == 1)
{
new SVID = SecurityVanID[playerid];
GetVehiclePos(SVID, X,Y,Z);
CreateExplosion(X, Y, Z, 7, 10);
SetVehicleHealth(SVID, 350);
SVBeingRobbed[SVID] = 1;
DetonateBomb[playerid] = 0;
MoneyLeft[SVID] = 5;
SendClientMessage(playerid, -1,"The bomb went off, /fill the bags and get out of here.");
}
else return SendClientMessage(playerid, -1,"You don't have a bomb planted anywhere.");
return 1;
}
This topic name might be wrong regarding this subject which i could need some help with, but anyhow.
Inside this script part, i'm trying to add that when player /detonate they will get 6 stars wanted level but no matter how I try it, when i compile it says "undefined symbol: SetWantedLevel". I'm not sure how to define that, a simple #define SetWantedLevel isn't working. Do i need to include another Inc? Or.. What's up here? PHP код:
|
SetPlayerWantedLevel(playerid, level);
SetPlayerWantedLevel(playerid, 1); //This will give them 1 star
new level[MAX_PLAYERS];
//Inside your command
level[playerid] = 1; //Setting that specific players level to 1
SetPlayerWantedLevel(playerid, level[playerid]); //This will add the star
You've never defined a variable for level therefor you've never given the player a wanted "level" If you want to give them a wanted level just use
pawn Код:
If you want to set their level via a variable just make something like pawn Код:
|
native GetPlayerWantedLevel(playerid);
This topic name might be wrong regarding this subject which i could need some help with, but anyhow.
Inside this script part, i'm trying to add that when player /detonate they will get 6 stars wanted level but no matter how I try it, when i compile it says "undefined symbol: SetWantedLevel". I'm not sure how to define that, a simple #define SetWantedLevel isn't working. Do i need to include another Inc? Or.. What's up here? PHP код:
|
CMD:detonate(playerid, params[])
{
new Float:Pos[3];
if(!DetonateBomb[playerid] == 1) return SendClientMessage(playerid, -1, "[SRV] You don't have a bomb placed.");
new SVID = SecurityVanID[playerid];
GetVehiclePos(SVID, Pos[0], Pos[1], Pos[2]);
CreateExplosion(Pos[0], Pos[1], Pos[2], 7, 10);
SetVehicleHealth(SVID, 350.0);
SetPlayerWantedLevel(playerid, 6);
SVBeingRobbed[SVID] = 1;
DetonateBomb[playerid] = 0;
MoneyLeft[SVID] = 5;
SendClientMessage(playerid, -1, "[SRV] The bomb went off! "{1A80E6}"/fill "{FFFFFF}"the bags and get out of there!");
}