348public OnPlayerDeath(playerid, killerid, reason) 349{ 350 if(killerid == INVALID_PLAYER_ID) { SendDeathMessage(INVALID_PLAYER_ID,playerid,reason); } else { SendDeathMessage(killerid,playerid,reason); } return 1; if(PlayerDied[playerid] == true) { PlayerDied[playerid] = false; if(KillerID[playerid] != INVALID_PLAYER_ID) TogglePlayerSpectating(playerid,1); PlayerSpectatePlayer(playerid,killerid); SetTimerEx("spawn",10000,1, "i", playerid); } else { TogglePlayerSpectating(playerid, 0); } return 1; }
IsPlayerInInvalidNosVehicle(playerid,vehicleid){ new InvalidNosVehicles[MAX_INVALID_NOS_VEHICLES] ={ 581,523,462,521,463,522,461,448,468,586, 509,481,510,472,473,493,595,484,430,453, 452,446,454,590,569,537,538,570,449, 406 }; 407 408 vehicleid = GetPlayerVehicleID(playerid); if(IsPlayerInVehicle(playerid,vehicleid)){ for(new i = 0; i < MAX_INVALID_NOS_VEHICLES; i++){ if(GetVehicleModel(vehicleid) == InvalidNosVehicles[i]){ return true; } } } return false; }
public OnPlayerDeath(playerid, killerid, reason)
{
 if(killerid == INVALID_PLAYER_ID)
 {
  SendDeathMessage(INVALID_PLAYER_ID,playerid,reason);
 }
 else
 {
  SendDeathMessage(killerid,playerid,reason);
 }
 if(PlayerDied[playerid] == true)
 {
  PlayerDied[playerid] = false;
  if(KillerID[playerid] != INVALID_PLAYER_ID)
  TogglePlayerSpectating(playerid,1);
  PlayerSpectatePlayer(playerid,killerid);
  SetTimerEx("spawn",10000,1, "i", playerid);
 }
 else
 {
  TogglePlayerSpectating(playerid, 0);
 }
 return 1;
}
Originally Posted by dlegend
no the bottom one is still wrong
thanks |
IsPlayerInInvalidNosVehicle(playerid,vehicleid){ new InvalidNosVehicles[MAX_INVALID_NOS_VEHICLES] ={ 581,523,462,521,463,522,461,448,468,586, 509,481,510,472,473,493,595,484,430,453, 452,446,454,590,569,537,538,570,449, }; 806 vehicleid = GetPlayerVehicleID(playerid); if(IsPlayerInVehicle(playerid,vehicleid)){ for(new i = 0; i < MAX_INVALID_NOS_VEHICLES; i++){ if(GetVehicleModel(vehicleid) == InvalidNosVehicles[i]){ return true; } } } return false; }
798 IsPlayerInInvalidNosVehicle(playerid,vehicleid){ 799 800 new InvalidNosVehicles[MAX_INVALID_NOS_VEHICLES] ={ 801 581,523,462,521,463,522,461,448,468,586, 802 509,481,510,472,473,493,595,484,430,453, 803 452,446,454,590,569,537,538,570,449, 804 }; 805 806 vehicleid = GetPlayerVehicleID(playerid); 807 808 if(IsPlayerInVehicle(playerid,vehicleid)){ 809 for(new i = 0; i < MAX_INVALID_NOS_VEHICLES; i++){ 810 if(GetVehicleModel(vehicleid) == InvalidNosVehicles[i]){ 811 return true; 812 } 113 } 114 } 115 return false; }
798 IsPlayerInInvalidNosVehicle(playerid,vehicleid){ 799 800 new InvalidNosVehicles[MAX_INVALID_NOS_VEHICLES] ={ 801 581,523,462,521,463,522,461,448,468,586, 802 509,481,510,472,473,493,595,484,430,453, 803 452,446,454,590,569,537,538,570,449, 804 }; 805 806 vehicleid = GetPlayerVehicleID(playerid); 807 808 if(IsPlayerInVehicle(playerid,vehicleid)){ 809 for(new i = 0; i < MAX_INVALID_NOS_VEHICLES; i++){ 810 if(GetVehicleModel(vehicleid) == InvalidNosVehicles[i]){ 811 return true; 812 } 113 } 114 } 115 return false; }