06.04.2014, 11:15
pawn Код:
forward playerpaintballing(playerid);
public playerpaintballing(playerid)
{
if(PlayerPaintballing[playerid] == 1)
{
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
GunsBeingRemoved[playerid] = 1;
ResetPlayerWeapons(playerid);
DestroyPickup(pbHealth);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
new rand = random(sizeof(PaintballSpawns));
SetPlayerPos(playerid, PaintballSpawns[rand][0], PaintballSpawns[rand][1], PaintballSpawns[rand][2]);
for (new i = 0; i < 13; i++)
{
GiveDodWeapon(playerid, pbGuns[2][0], 99999);
GiveDodWeapon(playerid, pbGuns[3][0], 99999);
GiveDodWeapon(playerid, pbGuns[4][0], 99999);
GiveDodWeapon(playerid, pbGuns[5][0], 99999);
GiveDodWeapon(playerid, pbGuns[6][0], 99999);
}
SetCameraBehindPlayer(playerid);
}
}
Usage EXAMPLE::
pawn Код:
CMD:paintball(playerid,params[])
{
playerpaintballing(playerid);
return 1;
}