Mine
pawn Код:
public OnPlayerSpawn(playerid)
{
if(IsPlayerNPC(playerid)) return 1;
new randSpawn = 0;
SetPlayerInterior(playerid,0);
TogglePlayerClock(playerid,0);
ResetPlayerMoney(playerid);
GivePlayerMoney(playerid, 30000);
// if they ever return to class selection make them city
// select again first
gPlayerHasCitySelected[playerid] = 0;
if(CITY_LOS_SANTOS == gPlayerCitySelection[playerid]) {
randSpawn = random(sizeof(gRandomSpawns_LosSantos));
SetPlayerPos(playerid,
gRandomSpawns_LosSantos[randSpawn][0],
gRandomSpawns_LosSantos[randSpawn][1],
gRandomSpawns_LosSantos[randSpawn][2]);
SetPlayerFacingAngle(playerid,gRandomSpawns_LosSantos[randSpawn][3]);
}
else if(CITY_SAN_FIERRO == gPlayerCitySelection[playerid]) {
randSpawn = random(sizeof(gRandomSpawns_SanFierro));
SetPlayerPos(playerid,
gRandomSpawns_SanFierro[randSpawn][0],
gRandomSpawns_SanFierro[randSpawn][1],
gRandomSpawns_SanFierro[randSpawn][2]);
SetPlayerFacingAngle(playerid,gRandomSpawns_SanFierro[randSpawn][3]);
}
else if(CITY_LAS_VENTURAS == gPlayerCitySelection[playerid]) {
randSpawn = random(sizeof(gRandomSpawns_LasVenturas));
SetPlayerPos(playerid,
gRandomSpawns_LasVenturas[randSpawn][0],
gRandomSpawns_LasVenturas[randSpawn][1],
gRandomSpawns_LasVenturas[randSpawn][2]);
SetPlayerFacingAngle(playerid,gRandomSpawns_LasVenturas[randSpawn][3]);
}
/*SetPlayerSkillLevel(playerid,WEAPONSKILL_PISTOL,200);
SetPlayerSkillLevel(playerid,WEAPONSKILL_PISTOL_SILENCED,200);
SetPlayerSkillLevel(playerid,WEAPONSKILL_DESERT_EAGLE,200);
SetPlayerSkillLevel(playerid,WEAPONSKILL_SHOTGUN,200);
SetPlayerSkillLevel(playerid,WEAPONSKILL_SAWNOFF_SHOTGUN,200);
SetPlayerSkillLevel(playerid,WEAPONSKILL_SPAS12_SHOTGUN,200);
SetPlayerSkillLevel(playerid,WEAPONSKILL_MICRO_UZI,200);
SetPlayerSkillLevel(playerid,WEAPONSKILL_MP5,200);
SetPlayerSkillLevel(playerid,WEAPONSKILL_AK47,200);
SetPlayerSkillLevel(playerid,WEAPONSKILL_M4,200);
SetPlayerSkillLevel(playerid,WEAPONSKILL_SNIPERRIFLE,200);*/
return 1;
}
grandlarc
pawn Код:
public OnPlayerSpawn(playerid)
{
if(IsPlayerNPC(playerid)) return 1;
new randSpawn = 0;
SetPlayerInterior(playerid,0);
TogglePlayerClock(playerid,0);
ResetPlayerMoney(playerid);
GivePlayerMoney(playerid, 30000);
// if they ever return to class selection make them city
// select again first
gPlayerHasCitySelected[playerid] = 0;
if(CITY_LOS_SANTOS == gPlayerCitySelection[playerid]) {
randSpawn = random(sizeof(gRandomSpawns_LosSantos));
SetPlayerPos(playerid,
gRandomSpawns_LosSantos[randSpawn][0],
gRandomSpawns_LosSantos[randSpawn][1],
gRandomSpawns_LosSantos[randSpawn][2]);
SetPlayerFacingAngle(playerid,gRandomSpawns_LosSantos[randSpawn][3]);
}
else if(CITY_SAN_FIERRO == gPlayerCitySelection[playerid]) {
randSpawn = random(sizeof(gRandomSpawns_SanFierro));
SetPlayerPos(playerid,
gRandomSpawns_SanFierro[randSpawn][0],
gRandomSpawns_SanFierro[randSpawn][1],
gRandomSpawns_SanFierro[randSpawn][2]);
SetPlayerFacingAngle(playerid,gRandomSpawns_SanFierro[randSpawn][3]);
}
else if(CITY_LAS_VENTURAS == gPlayerCitySelection[playerid]) {
randSpawn = random(sizeof(gRandomSpawns_LasVenturas));
SetPlayerPos(playerid,
gRandomSpawns_LasVenturas[randSpawn][0],
gRandomSpawns_LasVenturas[randSpawn][1],
gRandomSpawns_LasVenturas[randSpawn][2]);
SetPlayerFacingAngle(playerid,gRandomSpawns_LasVenturas[randSpawn][3]);
}
//SetPlayerColor(playerid,COLOR_NORMAL_PLAYER);
SetPlayerSkillLevel(playerid,WEAPONSKILL_PISTOL,200);
SetPlayerSkillLevel(playerid,WEAPONSKILL_PISTOL_SILENCED,200);
SetPlayerSkillLevel(playerid,WEAPONSKILL_DESERT_EAGLE,200);
SetPlayerSkillLevel(playerid,WEAPONSKILL_SHOTGUN,200);
SetPlayerSkillLevel(playerid,WEAPONSKILL_SAWNOFF_SHOTGUN,200);
SetPlayerSkillLevel(playerid,WEAPONSKILL_SPAS12_SHOTGUN,200);
SetPlayerSkillLevel(playerid,WEAPONSKILL_MICRO_UZI,200);
SetPlayerSkillLevel(playerid,WEAPONSKILL_MP5,200);
SetPlayerSkillLevel(playerid,WEAPONSKILL_AK47,200);
SetPlayerSkillLevel(playerid,WEAPONSKILL_M4,200);
SetPlayerSkillLevel(playerid,WEAPONSKILL_SNIPERRIFLE,200);
GivePlayerWeapon(playerid,WEAPON_COLT45,100);
//GivePlayerWeapon(playerid,WEAPON_MP5,100);
//TogglePlayerClock(playerid, 1);
return 1;
}