05.08.2017, 04:30
i have download fs register/login with bud include.when get killed,the wasted text no deleted.
public OnPlayerDeath(PID, killerid, reason)
{
if(killerid != INVALID_PLAYER_ID)
{
SetPlayerScore(killerid, GetPlayerScore(killerid)+1);
GivePlayerMoney(killerid, 4000);
scm(killerid, -1, "Congratulation!You have gained 4000$ and +2 score.");
SetPlayerScore(PID, GetPlayerScore(PID) -1);
GivePlayerMoney(PID, -2000);
scm(PID, -1, "You lost 2000$ because you noob.");
}
if(god_mode[PID] == 1)
{
god_mode[PID] = 0;
return 1;
}
if(InDM[PID] == true)
{
if(anakko[PID] == 1)
{
anakko[PID] = 0;
if(makko[PID] != INVALID_PLAYER_ID)
TogglePlayerSpectating(PID, 1);
PlayerSpectatePlayer(PID, killerid);
SendClientMessage(PID, WHITE, "You have been killed, you are now spectating your killer.");
SetTimerEx("EndDeathCam", 10000, false, "i", playerid);
}
else
{
TogglePlayerSpectating(PID, 0);
killstreak(PID, killerid);
DestroyDynamic3DTextLabel(wanted[PID]);
return 1;
}
}
PlayerTextDrawHide(PID,Textdraw0);
PlayerTextDrawHide(PID,Textdraw1);
PlayerTextDrawHide(PID,Textdraw2);
PlayerTextDrawHide(PID,Textdraw3);
gPlayerHasCitySelected[PID] = 0;
anakko[PID] = 1;
GameTextForPlayer(PID,"~w~Wasted",500,2);
UnderWater[PID]=0;
return 1;
}
public OnPlayerSpawn(PID)
{
if(IsPlayerNPC(PID)) return 1;
SetPlayerSkillLevel(PID,WEAPONSKILL_PISTOL,1000);
SetPlayerSkillLevel(PID,WEAPONSKILL_PISTOL_SILENCED,1000);
SetPlayerSkillLevel(PID,WEAPONSKILL_DESERT_EAGLE,1000);
SetPlayerSkillLevel(PID,WEAPONSKILL_SHOTGUN,1000);
SetPlayerSkillLevel(PID,WEAPONSKILL_SAWNOFF_SHOTGUN,1000);
SetPlayerSkillLevel(PID,WEAPONSKILL_SPAS12_SHOTGUN,1000);
SetPlayerSkillLevel(PID,WEAPONSKILL_MICRO_UZI,1000);
SetPlayerSkillLevel(PID,WEAPONSKILL_MP5,1000);
SetPlayerSkillLevel(PID,WEAPONSKILL_AK47,1000);
SetPlayerSkillLevel(PID,WEAPONSKILL_M4,1000);
SetPlayerSkillLevel(PID,WEAPONSKILL_SNIPERRIFLE,1000);
PlayerTextDrawHide(PID,Textdraw0);
PlayerTextDrawHide(PID,Textdraw1);
PlayerTextDrawHide(PID,Textdraw2);
PlayerTextDrawHide(PID,Textdraw3);
SetPlayerInterior(PID,0);
TogglePlayerClock(PID,0);
GivePlayerMoney(PID, 350);
power(PID);
UnderWater[PID]=0;
if(abangmacho11 == crukk11[PID])
{
new spawn = random(sizeof(gRandomSpawns_LosSantos));
SetPlayerPos(PID, gRandomSpawns_LosSantos[spawn][0], gRandomSpawns_LosSantos[spawn][1], gRandomSpawns_LosSantos[spawn][2]);
SetPlayerFacingAngle(PID, gRandomSpawns_LosSantos[spawn][3]);
}
if(god_mode[PID] == 1)
{
SetPlayerHealth(PID, Float:0x7F800000);
}
if(InDM[PID] == true)
{
switch (DM[PID])
{
case 0: shamal
{
GivePlayerWeapon(PID, 24, 1000);
SetPlayerHealth(PID, 99);
SetPlayerArmour(PID, 99);
new spawn = random(sizeof(DMZeroSpawns));
SetPlayerPos(PID, DMZeroSpawns[spawn][0], DMZeroSpawns[spawn][1], DMZeroSpawns[spawn][2]);
SetPlayerFacingAngle(PID, DMZeroSpawns[spawn][3]);
SetPlayerInterior(PID, 1); //>> SetPlayerInterior
SetPlayerVirtualWorld(PID, 1);
SetPlayerHealth(PID, 99);
}
}
}
if(CITY_LOS_SANTOS == gPlayerCitySelection[PID])
{
randSpawn = random(sizeof(gRandomSpawns_LosSantos));
SetPlayerPos(PID,gRandomSpawns_LosSantos[randSpawn][0],gRandomSpawns_LosSantos[randSpawn][1],gRandomSpawns_LosSantos[randSpawn][2]);
SetPlayerFacingAngle(PID,gRandomSpawns_LosSantos[randSpawn][3]);
}
else if(CITY_SAN_FIERRO == gPlayerCitySelection[PID])
{
randSpawn = random(sizeof(gRandomSpawns_SanFierro));
SetPlayerPos(PID,gRandomSpawns_SanFierro[randSpawn][0],gRandomSpawns_SanFierro[randSpawn][1],gRandomSpawns_SanFierro[randSpawn][2]);
SetPlayerFacingAngle(PID,gRandomSpawns_SanFierro[randSpawn][3]);
}
else if(CITY_LAS_VENTURAS == gPlayerCitySelection[PID])
{
randSpawn = random(sizeof(gRandomSpawns_LasVenturas));
SetPlayerPos(PID,gRandomSpawns_LasVenturas[randSpawn][0],gRandomSpawns_LasVenturas[randSpawn][1],gRandomSpawns_LasVenturas[randSpawn][2]);
SetPlayerFacingAngle(PID,gRandomSpawns_LasVenturas[randSpawn][3]);
}
return 1;
}
public OnPlayerDamage(&PID, &Float:amount, &issuerid, &weapon, &bodypart)
{
if(god_mode[PID])
return 0;
if(issuerid != INVALID_PLAYER_ID && bodypart == 9 && !IsPlayerAdmin(PID))// I recommend defining bodyparts.
{
if(IsPlayerConnected(issuerid))
{
new string[100], pname[24];
GetPlayerName(PID, headshot, sizeof(headshot));
GetPlayerName(issuerid, pname, sizeof(pname));
format(string, sizeof(string), "%s(%i) was shot in the head by %s(%i)", headshot,PID, pname, issuerid);
scms(0x800000AA,string);
GameTextForPlayer(issuerid,"~r~HeadShot",2000,1);
//PlayerPlaySound(issuerid, 17802, 0.0, 0.0, 0.0);// There is already a ding sound that you can play when someone gets shot.
GameTextForPlayer(PID,"~r~HeadShot",2000,1);
//ClearAnimations(PID);
//ApplyAnimation(PID, "PED", "ko2", 4.1, 1, 1, 1, 1, 1, 1);// Redundant? People already play a custom animation when getting shot in the head and falling down in weapon-config.
//PlayerPlaySound(PID, 17802, 0.0, 0.0, 0.0);// There is already a ding sound that you can play when someone gets shot.
GivePlayerMoney(issuerid, 1000);
GameTextForPlayer(PID,"~w~Wasted",500,2);
amount = 0.0;// If you set the amount of damage to 0.0, it means that it kills the player. As is documented here: https://github.com/oscar-broman/samp-wea...9.45906772
return 1;//Returning 1 to make sure that the damage gets applied right away.
}
}
return 1;
}