03.03.2013, 17:59
I changed something in the commands, try these:
I just used the code I wrote in my first post, and placed it at the right place.
I hope it works
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 hope it works