08.06.2011, 14:36
Hello Ive been trying to add this code to onplayerdeath but I get constantly errors! Can you help me put this together?
I want this code to be added to this:
EDIT: I really just want this to be added
FadePlayerScreen(playerid, 0xFFFFFFCC, 6, 192);
GameTextForPlayer(playerid,"~w~LOL, YOU DIED",1000,1);
Just that the screen will fade and show that message
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
FadePlayerScreen(playerid, 0xFFFFFFCC, 6, 192);
GameTextForPlayer(playerid,"~w~LOL, YOU DIED",1000,1);
SendDeathMessage(killerid, playerid, reason);
GameTextForPlayer(killerid,"~r~You Murderer!",4000,3);
if( DMZone[killerid] >= 1 )
{
GivePlayerMoney(killerid, 1000);
}
if( DMZone[killerid] == 0 )
{
GivePlayerMoney(killerid, -2000);
SendClientMessage(killerid, COLOR_RED, "Please don't kill others outside deathmatch zones. (-2000$)");
}
return 1;
}
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
SendDeathMessage(killerid, playerid, reason);
if(IsInDM[playerid] ==1)
{
SetPlayerScore(killerid,GetPlayerScore(killerid)+1);
SetPlayerScore(playerid,GetPlayerScore(playerid)-1);
GivePlayerMoney(killerid, 1800);
GivePlayerMoney(playerid, -1000);
return 1;
}
if(IsInDM[playerid] ==0)
{
SetPlayerScore(killerid,GetPlayerScore(killerid)-1);
GivePlayerMoney(killerid, -2000);
return 1;
}
IsInDM[playerid] = 0;
nojump2[playerid] = 0;
return 1;
}
FadePlayerScreen(playerid, 0xFFFFFFCC, 6, 192);
GameTextForPlayer(playerid,"~w~LOL, YOU DIED",1000,1);
Just that the screen will fade and show that message