Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public OnPlayerSpawn(playerid)
- {
- ApplyAnimation(playerid, "MISC", "null",0.0,0,0,0,0,0);
- SetPVarInt(playerid, "alahambra", 0);
- // Re-load osticks
- for(new i=0; i<MAX_PLAYER_ATTACHED_OBJECTS; i++)
- {
- if(ostick[playerid][i][os_model])
- {
- SetPlayerAttachedObject(playerid, i, ostick[playerid][i][os_model],ostick[playerid][i][os_bone],ostick[playerid][i][os_x],ostick[playerid][i][os_y],ostick[playerid][i][os_z],ostick[playerid][i][os_rx],ostick[playerid][i][os_ry],ostick[playerid][i][os_rz],ostick[playerid][i][os_scalex],ostick[playerid][i][os_scaley],ostick[playerid][i][os_scalez]);
- }
- }
- if(!pWorld[playerid] && GetPVarInt(playerid, "Logged") != LOGIN_STATUS_LOGIN && !GetPVarInt(playerid, "tut_stage")) SetPlayerVirtualWorld(playerid, 0);
- if(GetPVarInt(playerid, "Logged") == LOGIN_STATUS_LOGGED || GetPVarInt(playerid, "Logged") == LOGIN_STATUS_REGISTER)
- {
- if(GetPVarInt(playerid, "UFS")) SetPlayerSkin(playerid, GetPVarInt(playerid, "Skin"));
- else SetPlayerSkin(playerid, GetPVarInt(playerid, "TempSkin"));
- }
- if(GetPVarInt(playerid, "Logged") == LOGIN_STATUS_LOGIN) return 1;
- SetPlayerArmour(playerid, 0);
- if(GetPVarInt(playerid, "Logged") == LOGIN_STATUS_LOGGED) SetPlayerTime(playerid, curPlayerHour[playerid], curPlayerMin[playerid]);
- else SetPlayerTime(playerid, DEFAULT_HOUR, DEFAULT_MINUTE);
- DisablePlayerRaceCheckpoint(playerid);
- TogglePlayerControllable(playerid, 1);
- SetPlayerWeather(playerid, curPlayerWeather[playerid]);
- if(GetPVarFloat(playerid, "SPAWN_X") == 0 && GetPVarFloat(playerid, "SPAWN_Y") == 0 && GetPVarFloat(playerid, "SPAWN_Z") == 0 && !pExitVehicle[playerid])
- {
- SetPlayerPos(playerid, 1901+random(51), 679+random(4), 10.8203);
- SetPlayerMapIcon(playerid, MAP_ICON_SPAWN, 1925.1892, 703.1492, 16.0190, 38, 0, MAPICON_GLOBAL);
- SetPlayerInt(playerid, 0);
- }
- if(GetPVarInt(playerid, "Logged") == LOGIN_STATUS_REGISTER && !pExitVehicle[playerid])
- {
- SetPlayerPos(playerid, 1901+random(51), 679+random(4), 10.8203);
- SetPlayerMapIcon(playerid, MAP_ICON_SPAWN, 1925.1892, 703.1492, 16.0190, 38, 0, MAPICON_GLOBAL);
- SetPlayerInt(playerid, 0);
- }
- if(GetPVarInt(playerid, "Logged") == LOGIN_STATUS_LOGGED && !pExitVehicle[playerid] && GetPVarFloat(playerid, "SPAWN_X") != 0 && GetPVarFloat(playerid, "SPAWN_Y") != 0 && GetPVarFloat(playerid, "SPAWN_Z") != 0)
- {
- SetPlayerInt(playerid, GetPVarInt(playerid, "SPAWN_I"));
- Streamer_UpdateEx(playerid, GetPVarFloat(playerid, "SPAWN_X"), GetPVarFloat(playerid, "SPAWN_Y"), GetPVarFloat(playerid, "SPAWN_Z"));
- SetPlayerPos(playerid, GetPVarFloat(playerid, "SPAWN_X"), GetPVarFloat(playerid, "SPAWN_Y"), GetPVarFloat(playerid, "SPAWN_Z"));
- SetPlayerMapIcon(playerid, MAP_ICON_SPAWN, GetPVarFloat(playerid, "SPAWN_X"), GetPVarFloat(playerid, "SPAWN_Y"), GetPVarFloat(playerid, "SPAWN_Z"), 38, 0, MAPICON_GLOBAL);
- if(GetPVarInt(playerid, "SPAWNVEH"))
- {
- new vid;
- #if GLOBAL_VCOLOR != -1
- if(!pWorld[playerid] && GetPlayerLevel(playerid) < LEVEL_MOD) vid = CreateVehicleEx(GetPVarInt(playerid, "SPAWNVEH"), GetPVarFloat(playerid, "SPAWN_X"),GetPVarFloat(playerid, "SPAWN_Y"),GetPVarFloat(playerid, "SPAWN_Z") + 1.0, 0, GLOBAL_VCOLOR, GLOBAL_VCOLOR2, 60);
- else vid = CreateVehicleEx(GetPVarInt(playerid, "SPAWNVEH"), GetPVarFloat(playerid, "SPAWN_X"),GetPVarFloat(playerid, "SPAWN_Y"),GetPVarFloat(playerid, "SPAWN_Z") + 1.0, 0, GetPVarInt(playerid, "vcolor"), GetPVarInt(playerid, "vcolor2"), -1);
- #else
- if(!pWorld[playerid] && GetPlayerLevel(playerid) < LEVEL_MOD) vid = CreateVehicleEx(GetPVarInt(playerid, "SPAWNVEH"), GetPVarFloat(playerid, "SPAWN_X"),GetPVarFloat(playerid, "SPAWN_Y"),GetPVarFloat(playerid, "SPAWN_Z") + 1.0, 0, GLOBAL_VCOLOR, GLOBAL_VCOLOR2, 60);
- else vid = CreateVehicleEx(GetPVarInt(playerid, "SPAWNVEH"), GetPVarFloat(playerid, "SPAWN_X"),GetPVarFloat(playerid, "SPAWN_Y"),GetPVarFloat(playerid, "SPAWN_Z") + 1.0, 0, GetPVarInt(playerid, "vcolor"), GetPVarInt(playerid, "vcolor2"), -1);
- #endif
- Vehicle[vid][driver] = playerid;
- new color1[16];
- if(GetPVarInt(playerid, "Color") == -1)
- {
- if(IsMike(playerid)) color1 = "FFD720";
- else format(color1, 16, "%s", PlayerColors2[playerid]);
- }
- else format(color1, 16, "%s", PlayerColors2[GetPVarInt(playerid, "Color")]);
- format(szString, sizeof(szString), "{%s}%s", color1, pName[playerid]);
- SetVehicleNumberPlate(vid, szString);
- SetVehicleInterior(vid, GetPVarInt(playerid, "SPAWN_I"));
- if(!pWorld[playerid]) SetVehicleVirtualWorld(vid, 0);
- else SetVehicleVirtualWorld(vid, GetPlayerVirtualWorld(playerid));
- Vehicle[vid][pjob] = 255;
- PutPlayerInVehicle(playerid, vid, 0);
- SetVehicleZAngle(vid, GetPVarFloat(playerid, "SPAWN_A"));
- }
- else SetPlayerFacingAngle(playerid, GetPVarFloat(playerid, "SPAWN_A"));
- }
- SetCameraBehindPlayer(playerid);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment