14.08.2012, 02:20
Hello, I got problem that sometimes when i dead im falling in this place (Which will appear in the pic) , and after 4 sec i respawned , its sometimes!
I think problem OnPlayerSpawn? or OnPlayerDeath i will give u both of Codes
Here is the pic:
http://imageshack.us/photo/my-images/171/samp017hj.png/
please help!
I think problem OnPlayerSpawn? or OnPlayerDeath i will give u both of Codes
Код:
public OnPlayerSpawn(playerid) { ResetPlayerWeapons(playerid); GivePlayerWeapon(playerid,26,100); GivePlayerWeapon(playerid,24,100); PlayerInfo[playerid][SpawnAngle] = 0.0; //so when you leave and another player comes, the camera will start from start PlayerInfo[playerid][SpawnDance] = true; //to not execute to much timers KillTimer( PlayerInfo[playerid][SpawnTimer] ); //to kill it, since its useless now PlayerPlaySound(playerid, 1186, 0.0, 0.0, 0.0); // (blank sound) to shut the music up SetCameraBehindPlayer(playerid); //to prevent some bugs PlayCrimeReportForPlayer(playerid, playerid, 3); SetPlayerFightingStyle(playerid, FIGHT_STYLE_KUNGFU); PlayerPlaySound(playerid, 1098,-119.9460,23.1096,12.2238); DMZone[playerid] = 0; new rand = random(sizeof(RandomPlayerSpawns)); SetPlayerPos(playerid, RandomPlayerSpawns[rand][0], RandomPlayerSpawns[rand][1], RandomPlayerSpawns[rand][2]); return 1; } public OnPlayerDeath(playerid, killerid, reason) { SendDeathMessage(killerid, playerid, reason); KillingSpree[playerid] = 0; KillingSpree[killerid]++; new file[100],Name[MAX_PLAYER_NAME],Ip[16],name[MAX_PLAYER_NAME]; GetPlayerName(giveplayerid, name, sizeof(name)); GetPlayerName(playerid,Name,sizeof(Name)); GetPlayerIp(playerid,Ip,sizeof(Ip)); format(file,sizeof(file),PlayerFile,Name); PlayerTotalKills[killerid]++; PlayerTotalKills[playerid] = 0; if(PlayerTotalKills[killerid] == 1) { PlayAudioStreamForPlayer(killerid, "http://www.pamp3.site40.net/quake/firstblood.mp3"); } if(PlayerTotalKills[killerid] == 2) { PlayAudioStreamForPlayer(killerid, "http://www.pamp3.site40.net/quake/doublekill.mp3"); return 1; } if(PlayerTotalKills[killerid] == 3) { PlayAudioStreamForPlayer(killerid, "http://www.pamp3.site40.net/quake/killingspree.mp3"); return 1; } if(PlayerTotalKills[killerid] == 4) { PlayAudioStreamForPlayer(killerid, "http://www.pamp3.site40.net/quake/dominating.mp3"); return 1; } if(PlayerTotalKills[killerid] == 5) { PlayAudioStreamForPlayer(killerid, "http://www.pamp3.site40.net/quake/triplekill.mp3"); return 1; } if(PlayerTotalKills[killerid] == 7) { PlayAudioStreamForPlayer(killerid, "http://www.pamp3.site40.net/quake/monsterkill.mp3"); return 1; } if(PlayerTotalKills[killerid] == 9) { PlayAudioStreamForPlayer(killerid, "http://www.pamp3.site40.net/quake/wickedsick.mp3"); return 1; } if(PlayerTotalKills[killerid] == 11) { PlayAudioStreamForPlayer(killerid, "http://www.pamp3.site40.net/quake/ludicrouskill.mp3"); return 1; } if(PlayerTotalKills[killerid] == 13) { PlayAudioStreamForPlayer(killerid, "http://www.pamp3.site40.net/quake/ultrakill.mp3"); return 1; } if(PlayerTotalKills[killerid] == 15) { PlayAudioStreamForPlayer(killerid, "http://www.pamp3.site40.net/quake/unstoppable.mp3"); return 1; } if( DMZone[killerid] >= 1) { GivePlayerMoney(killerid, 500); GivePlayerMoney(playerid, -500); GameTextForPlayer(playerid, "~r~~N~~N~~N~~N~~N~~N~YOUR KILLER~N~~W~RESPAWN AFTER 5 SECONDS..", 7000, 5); PlayCrimeReportForPlayer(killerid, killerid, 3); } if( DMZone[killerid] == 0) { GivePlayerMoney(killerid, 500); GivePlayerMoney(playerid, -500); GameTextForPlayer(playerid, "~r~~N~~N~~N~~N~~N~~N~YOUR KILLER~N~~W~RESPAWN AFTER 5 SECONDS..", 7000, 5); PlayCrimeReportForPlayer(killerid, killerid, 3); } #if defined specdeath TogglePlayerSpectating(playerid, 1); SetPlayerInterior(playerid, GetPlayerInterior(killerid)); PlayerSpectatePlayer(playerid, killerid); SetTimerEx(#specd, 1000*10, false, "i",playerid); #endif return 1; }
http://imageshack.us/photo/my-images/171/samp017hj.png/
please help!