Posts: 284
Threads: 77
Joined: Nov 2013
Hello, I noticed that when i do /kill in my server i got msg that i dead but he anim the death after 3 seconds
The command is fine:
Код:
CMD:Kill
{
SetPlayerHealth(playerid,0);
}
So player till 3seconds to death after do the command what this could be :S
Posts: 284
Threads: 77
Joined: Nov 2013
Quote:
Originally Posted by [KHK]Khalid
You're talking about that shaking camera after you die? You want to disable that?
Add this stock to your script
pawn Код:
stock ALTER_SpawnPlayer(playerid) { if(IsPlayerInAnyVehicle(playerid)) RemovePlayerFromVehicle(playerid); SetPlayerPos(playerid, 0, 0, 0); SpawnPlayer(playerid); return 1; }
then use it under OnPlayerDeath like this:
pawn Код:
public OnPlayerDeath(playerid, killerid, reason) { // code .. // code .. // code .. // code .. ALTER_SpawnPlayer(playerid); return 1; }
|
+REP ill try it out , hey ur arabian :P marhaba
Posts: 284
Threads: 77
Joined: Nov 2013
Lol i got banned by Bot Detector for fake kill anyway, not that what i was mean , i mean when i type /kill player keep stand up and nothing happened after 2 seconds they die
Код:
This forum requires that you wait 240 seconds between posts. Please try again in 10 seconds.
_________________
xXx Stunt Paradise Awesome
Server IP:
Click Here!
Hosted Tab Game-MP for 10 Euro / per month
Hosted Tab + Server host 50 slots + Control Panel for 15 Euro
Skype:
MahdiAsali
Ђ10 Euro for Hosted List
Posts: 854
Threads: 5
Joined: Jan 2012
Reputation:
0
This always happens? Perhaps there's something wrong with your OnPlayerDeath or /kill command code, you may want to show it.
Posts: 284
Threads: 77
Joined: Nov 2013
Код:
if(strcmp(cmd,"/kill",true) == 0)
{
SetPlayerHealth(playerid, 0);
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
//Killingspree
new str[ 256 ], KillerName[MAX_PLAYER_NAME];
GetPlayerName(killerid, KillerName, sizeof(KillerName));
//vehicle destroy
SetVehicleToRespawn(GetPlayerVehicleID(playerid));
//end veh destroy
//End KS
GodMode[playerid] = 0;
SendDeathMessage(killerid, playerid, reason);
if(killerid != INVALID_PLAYER_ID)
{
TotalKills[killerid]++;
SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
GameTextForPlayer(killerid,"~w~+1 Score~R~~N~+1 kill~N~ ~g~+1000$", 5000, 1);
GivePlayerMoney(killerid, 1000);
Streaks[killerid]++;
if(Streaks[killerid] == 3) {
format(str, sizeof(str), "%s {00FFEE}is Triple Kill {FFAF00}(3 kills +3 Score!)", KillerName); //here, you're formatting the defined string and add the content (text)
SendClientMessageToAll(0xADFF2FAA, str);
SetPlayerScore(killerid, GetPlayerScore(killerid) + 2);
}
if(Streaks[killerid] == 5) {
format(str, sizeof(str), "%s {F81414}is Killing Spree {FFAF00}(5 Kills +5 Score!!)", KillerName); //got no creativity lmao lol//here, you're formatting the defined string and add the content (text)
SendClientMessageToAll(0xADFF2FAA, str);
SetPlayerScore(killerid, GetPlayerScore(killerid) + 4);
}
if(Streaks[killerid] == 10) {
format(str, sizeof(str), "%s {B8FF02}is UNSTOPPABLE {FFAF00}(10 Kills +10 Score!!!)", KillerName); //got no creativity lmao lol//here, you're formatting the defined string and add the content (text)
SendClientMessageToAll(0xADFF2FAA, str);
}
}
TotalDeaths[playerid]++;
SetPlayerScore(playerid, GetPlayerScore(playerid) - 1);
GivePlayerMoney(playerid, -1000);
GameTextForPlayer(playerid,"~R~W~B~A~G~S~W~T~P~E~G~D~N~~N~~N~~N~~N~~R~Rest ~W~In ~g~PEACE", 3000, 5);
return 1;
}