04.06.2012, 00:15
So i am trying to make it so when you do /giveweapon the other person has to accept it buy im getting stuck this is what i have could you help me a little bit please the person that is selling has to be holding it
In my enum
How would i carry that on
Also a little question
How can i stop people shooting out the passenger seat with guns ?
Thanks
Help is Appreciated
In my enum
pawn Код:
PendingGun
pawn Код:
command(giveweapon, playerid, params[])
{
new string[128], id, WeaponName[128];
if(sscanf(params, "uz", id, WeaponName))
{
SendClientMessage(playerid, WHITE, "SYNTAX: /giveweapon [playerid] [usage]");
SendClientMessage(playerid, WHITE, "Usages: SilencedPistol, AK47, PumpActionShotgun, MP5");
}
else
{
if(IsPlayerConnectedEx(id))
{
if(GetDistanceBetweenPlayers(id, playerid) < 7 && !IsPlayerInAnyVehicle(playerid))
{
if(strcmp(WeaponName, "silencedpistol", true) == 0)
{
if(Player[playerid][WepSlot2] == 23)
{
format(string, sizeof(string), "You have offered %s a %s.", GetName(id), WeaponName);
SendClientMessage(playerid, WHITE, string);
format(string, sizeof(string), "You have been offered weapon %s, by %s.", WeaponName, GetName(playerid));
SendClientMessage(id, WHITE, string);
Player[id][PendingGun] = 1;
}
}
}
}
}
pawn Код:
command(acceptgun, playerid, params[])
{
if(Player[playerid][PendingGun] == 1)
{
Also a little question
How can i stop people shooting out the passenger seat with guns ?
Thanks
Help is Appreciated