Help with resetplayerweapon
#6

I changed something in the commands, try these:
pawn Код:
new pWeapons[13];//idk how many weapons there are
new pAmmo[13];

if (strcmp("/enterpb", cmdtext, true) == 0)
{
if(!IsPlayerInRangeOfPoint(playerid, 10.0, 1310.1757, -1367.2603, 13.5262)) return SendClientMessage(playerid,0xAA3333AA,"You are not at Paintball");
{
for(new i=0; i < 13; i++)
{
GetPlayerWeaponData(playerid,i,pWeapons[i],pAmmo[i]);
}
ResetPlayerWeapons(playerid);
SetPlayerPos(playerid,-972.4957,1060.9830,1345.6690); // RC Battlefield Arena cords
SetPlayerInterior(playerid,10);
GivePlayerWeapon(playerid,24,99999); // DEAGLE
GivePlayerWeapon(playerid,27,99999); // SPAS12
SendClientMessage(playerid,0x2641FEAA,"You have joined paintball");
}
return 1;
}

if (strcmp("/exitpb", cmdtext, true) == 0)
{
if(!IsPlayerInRangeOfPoint(playerid, 1000.0,-972.4957,1060.9830,1345.6690)) return SendClientMessage(playerid,0xAA3333AA,"You are not in Paintball Arena");
{
SetPlayerPos(playerid, 1310.1757, -1367.2603, 13.5262);
SetPlayerInterior(playerid, 0);
ResetPlayerWeapons(playerid, 1);
for(new i=0; i < 13; i++)
{
GivePlayerWeapon(playerid,pWeapon[i],pAmmo[i]);
}
SendClientMessage(playerid,0xFF6347AA,"You have left paintball");
}
return 1;
}
I just used the code I wrote in my first post, and placed it at the right place.
I hope it works
Reply


Messages In This Thread
Help with resetplayerweapon - by Patkata - 03.03.2013, 17:37
Re: Help with resetplayerweapon - by Stefan10 - 03.03.2013, 17:40
Re: Help with resetplayerweapon - by zDevon - 03.03.2013, 17:41
Re: Help with resetplayerweapon - by Jstylezzz - 03.03.2013, 17:45
Re: Help with resetplayerweapon - by Patkata - 03.03.2013, 17:56
Re: Help with resetplayerweapon - by Jstylezzz - 03.03.2013, 17:59
Re: Help with resetplayerweapon - by Patkata - 03.03.2013, 18:13
Respuesta: Help with resetplayerweapon - by Strier - 03.03.2013, 18:20
Re: Help with resetplayerweapon - by Patkata - 03.03.2013, 18:39
Re: Help with resetplayerweapon - by ReVo_ - 03.03.2013, 20:01

Forum Jump:


Users browsing this thread: 1 Guest(s)