MY public OnPlayerSpawn
PHP код:
public OnPlayerSpawn(playerid)
{
if(IsPlayerNPC(playerid)) return 1;
PlayerTextDrawHide(playerid,Textdraw0);
PlayerTextDrawHide(playerid,Textdraw1);
PlayerTextDrawHide(playerid,Textdraw2);
PlayerTextDrawHide(playerid,Textdraw3);
new randSpawn = 0;
SetPlayerInterior(playerid,0);
TogglePlayerClock(playerid,0);
ResetPlayerMoney(playerid);
GivePlayerMoney(playerid, 30000);
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, 0);
if(god_mode[playerid]==1)
{ SetPlayerHealth(playerid,10000000000.0); }
else SetPlayerHealth(playerid,100.0);
return 1;
}
MY public OnPlayerDeath
PHP код:
public OnPlayerDeath(playerid, killerid, reason)
{
PlayerTextDrawHide(playerid,Textdraw0);
PlayerTextDrawHide(playerid,Textdraw1);
PlayerTextDrawHide(playerid,Textdraw2);
PlayerTextDrawHide(playerid,Textdraw3);
new playercash;
// if they ever return to class selection make them city
// select again first
gPlayerHasCitySelected[playerid] = 0;
if(killerid == INVALID_PLAYER_ID) {
ResetPlayerMoney(playerid);
} else {
playercash = GetPlayerMoney(playerid);
if(playercash > 0) {
GivePlayerMoney(killerid, playercash);
ResetPlayerMoney(playerid);
}
}
return 1;
}
GetNumberOfPages()
{
if((gTotalItems >= SELECTION_ITEMS) && (gTotalItems % SELECTION_ITEMS) == 0)
{
return (gTotalItems / SELECTION_ITEMS);
}
else return (gTotalItems / SELECTION_ITEMS) + 1;
}
went i put the add new code it become problem
and my gm has also menu to go dm map