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;
}

|
i will tell you whats your problem is you adidnt added a place where you will be after the death so add this
DOO_SetPlayerPos(playerid,1172.3759,-1321.6317,15.3992); on your scripts of OnPlayerDeath if it not working add SetPlayerPos(playerid,1172.3759,-1321.6317,15.3992); If i helps you REP & thanks |
new Float:RandomPlayerSpawns[3][3] = {
{404.79,2457.21,16.5000},
{-2633.79,1360.32,7.12},
{1116.8577,2494.9219,432.4359}
};
|
i will tell you whats your problem is you adidnt added a place where you will be after the death so add this
DOO_SetPlayerPos(playerid,1172.3759,-1321.6317,15.3992); on your scripts of OnPlayerDeath if it not working add SetPlayerPos(playerid,1172.3759,-1321.6317,15.3992); If i helps you REP & thanks |
|
I dont think its will fix the error, and i got
error 017: undefined symbol "TogglePlayerControl" |
switch(PlayerTotalKills[killerid])
{
case 1: { PlayAudioStreamForPlayer(killerid, "http://www.pamp3.site40.net/quake/firstblood.mp3"); }
case 2: { PlayAudioStreamForPlayer(killerid, "http://www.pamp3.site40.net/quake/doublekill.mp3"); }
}
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;
}