pawn Код:
public OnPlayerSpawn(playerid)
{
SetPlayerHealth(playerid, 99);
PreloadAnimLib(playerid,"BOMBER");
PreloadAnimLib(playerid,"RAPPING");
PreloadAnimLib(playerid,"SHOP");
PreloadAnimLib(playerid,"BEACH");
PreloadAnimLib(playerid,"SMOKING");
PreloadAnimLib(playerid,"ON_LOOKERS");
PreloadAnimLib(playerid,"DEALER");
PreloadAnimLib(playerid,"CRACK");
PreloadAnimLib(playerid,"CARRY");
PreloadAnimLib(playerid,"COP_AMBIENT");
PreloadAnimLib(playerid,"PARK");
PreloadAnimLib(playerid,"INT_HOUSE");
PreloadAnimLib(playerid,"FOOD");
PreloadAnimLib(playerid,"GANGS");
PreloadAnimLib(playerid,"PED");
PreloadAnimLib(playerid,"FAT");
PreloadAnimLib(playerid,"GRAFFITI");
SetPlayerToTeamColor(playerid);
SetPlayerSkin(playerid, playerVariables[playerid][pPlayerSkin]);
ResetPlayerWeapons(playerid);
StopAudioStreamForPlayer(playerid);
TogglePlayerSpectating(playerid, 0);
TogglePlayerControllable(playerid, true);
SetCameraBehindPlayer(playerid);
if(pbStarted == 1)
{
if(PEntered[playerid] == 1)
{
if(pbMAP == 1)
{
new rand;
rand = random(sizeof(PaintballSpawns1));
SetPlayerPos(playerid, PaintballSpawns1[rand][0], PaintballSpawns1[rand][1], PaintballSpawns1[rand][2]);
SetPlayerVirtualWorld(playerid, 10);
SetPlayerInterior(playerid, 10);
SetPlayerSkin(playerid, 293);
GivePlayerWeapon(playerid, pbGUN, 10000);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 0);
}
else if(pbMAP == 2)
{
new rand;
rand = random(sizeof(PaintballSpawns1));
SetPlayerPos(playerid, PaintballSpawns2[rand][0], PaintballSpawns2[rand][1], PaintballSpawns2[rand][2]);
SetPlayerVirtualWorld(playerid, 10);
SetPlayerInterior(playerid, 0);
SetPlayerSkin(playerid, 293);
GivePlayerWeapon(playerid, pbGUN, 10000);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 0);
}
}
return 1;
}
if(playerVariables[playerid][pSpawnSet] == 0)
{
if(playerVariables[playerid][pGroup] == 0)
{
SetPlayerVirtualWorld(playerid, 0);
SetPlayerPos(playerid, 2756.4507,-1182.4026,69.3996);
SetPlayerInterior(playerid, 0);
}
else
{
new group;
group = playerVariables[playerid][pGroup];
SetPlayerPos(playerid, groupVariables[group][gGroupInteriorPos][0], groupVariables[group][gGroupInteriorPos][1], groupVariables[group][gGroupInteriorPos][2]+1);
SetPlayerInterior(playerid, groupVariables[group][gGroupHQInteriorID]);
SetPlayerVirtualWorld(playerid, GROUP_VIRTUAL_WORLD+group);
}
}
else if(playerVariables[playerid][pSpawnSet] == 1)
{
new houseID = getPlayerHouseID(playerid);
new houserented = playerVariables[playerid][pHouseRented];
if(houseID >= 1)
{
SetPlayerInterior(playerid, houseVariables[houseID][hHouseInteriorID]);
SetPlayerVirtualWorld(playerid, HOUSE_VIRTUAL_WORLD+houseID);
SetPlayerPos(playerid, houseVariables[houseID][hHouseInteriorPos][0], houseVariables[houseID][hHouseInteriorPos][1], houseVariables[houseID][hHouseInteriorPos][2]);
InHouse[playerid] = houseID;
}
else
{
if(houserented >= 1)
{
SetPlayerInterior(playerid, houseVariables[houserented][hHouseInteriorID]);
SetPlayerVirtualWorld(playerid, HOUSE_VIRTUAL_WORLD+houserented);
SetPlayerPos(playerid, houseVariables[houserented][hHouseInteriorPos][0], houseVariables[houserented][hHouseInteriorPos][1], houseVariables[houserented][hHouseInteriorPos][2]);
InHouse[playerid] = houserented;
}
}
}
return 1;
}