16.05.2014, 12:39
Here guys
Код:
public OnPlayerSpawn(playerid) { if(IsPlayerNPC(playerid)) return 1; if(!gPlayerLogged{playerid}) { SendClientMessageEx(playerid, COLOR_WHITE, "ERROR: You are not logged in!"); Kick(playerid); return 1; } SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL, 1); SetPlayerSkillLevel(playerid, WEAPONSKILL_MICRO_UZI, 1); if(GetPVarInt(playerid, "NGPassenger") == 1) { new Float:X, Float:Y, Float:Z; GetVehiclePos(GetPVarInt(playerid, "NGPassengerVeh"), X, Y, Z); SetPlayerPos(playerid, (X-2.557), (Y-3.049), Z); SetPlayerWeaponsEx(playerid); GivePlayerValidWeapon(playerid, 46, 60000); SetPlayerSkin(playerid, GetPVarInt(playerid, "NGPassengerSkin")); SetPlayerHealth(playerid, GetPVarFloat(playerid, "NGPassengerHP")); SetPlayerArmour(playerid, GetPVarFloat(playerid, "NGPassengerArmor")); DeletePVar(playerid, "NGPassenger"); DeletePVar(playerid, "NGPassengerVeh"); DeletePVar(playerid, "NGPassengerArmor"); DeletePVar(playerid, "NGPassengerHP"); DeletePVar(playerid, "NGPassengerSkin"); return 1; } if(InsidePlane[playerid] != INVALID_VEHICLE_ID) { SetPlayerPos(playerid, GetPVarFloat(playerid, "air_Xpos"), GetPVarFloat(playerid, "air_Ypos"), GetPVarFloat(playerid, "air_Zpos")); SetPlayerFacingAngle(playerid, GetPVarFloat(playerid, "air_Rpos")); SetPlayerHealth(playerid, GetPVarFloat(playerid, "air_HP")); SetPlayerArmour(playerid, GetPVarFloat(playerid, "air_Arm")); SetPlayerWeaponsEx(playerid); SetPlayerToTeamColor(playerid); SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]); SetPlayerInterior(playerid, GetPVarInt(playerid, "air_Int")); DeletePVar(playerid, "air_Xpos"); DeletePVar(playerid, "air_Ypos"); DeletePVar(playerid, "air_Zpos"); DeletePVar(playerid, "air_Rpos"); DeletePVar(playerid, "air_HP"); DeletePVar(playerid, "air_Arm"); DeletePVar(playerid, "air_Mode"); DeletePVar(playerid, "air_Int"); SetCameraBehindPlayer(playerid); SetPlayerVirtualWorld(playerid, InsidePlane[playerid]); return 1; } SyncPlayerTime(playerid); if(GetPVarType(playerid, "STD")) { DeletePVar(playerid, "STD"); }