How to make if a target id type /accept
#1

Hello, i'm making a /sellgun command but i don't know how i can make
that the other player needs to to /accept weapon to get the weapon
from the seller. Here is my code :
Quote
if (ProxDetectorS(5.0, playerid, giveplayerid))
{
// I need to put here is target id types "/accept weapon"
if(PlayerInfo[playerid][pMiserPerk] > 0)
{
new skill = 2 * PlayerInfo[playerid][pMiserPerk];
new mats = price[playerid] / 100;
price[playerid] -= (mats)*(skill);
}
ConsumingMoney[playerid] = 1;
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), " You have given %s, a %s with %d ammo, for %d Materials.", giveplayer,x_weapon, ammo[playerid], price[playerid]);
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
SendClientMessage(playerid, COLOR_GRAD1, string);
format(string, sizeof(string), " You have recieved a %s with %d ammo from %s.", x_weapon, ammo[playerid], sendername);
SendClientMessage(giveplayerid, COLOR_GRAD1, string);
PlayerPlaySound(giveplayerid, 1052, 0.0, 0.0, 0.0);
format(string, sizeof(string), "* %s created a Gun from Materials, and hands it to %s.", sendername ,giveplayer);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
GivePlayerWeapon(giveplayerid,weapon[playerid],ammo[playerid]);
PlayerInfo[playerid][pMats] -= price[playerid];
}

Who can help me?
Reply
#2

And?
Reply
#3

Please do not bump yor topic every 5 minutes Probably someone is having a look at your code and writing an answer
Reply
#4

Quote:
Originally Posted by Ihsan_Cingisiz
Bump
Come on, i think that's not hard for you..
Reply
#5

Quote:
Originally Posted by Ihsan_Cingisiz
Quote:
Originally Posted by Ihsan_Cingisiz
Bump
Come on, i think that's not hard for you..
Is this so hard?
Reply
#6

Quote:
Originally Posted by Ihsan_Cingisiz
Quote:
Originally Posted by Ihsan_Cingisiz
Quote:
Originally Posted by Ihsan_Cingisiz
Bump
Come on, i think that's not hard for you..
Is this so hard?
bump
Reply
#7

Wow, 4 post in a row. What a spam
Just edit your post or wait till someone helps.
If nobody noes the answer you must find it.
Reply
#8

Ok You can do that using Dialogs
When you type /sellgun, you already get the id of the on eyou are selling to, so show the other player a dialog to accept.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)