OnVehicleDeath - OnPlayerDeath? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: OnVehicleDeath - OnPlayerDeath? (
/showthread.php?tid=168294)
OnVehicleDeath - OnPlayerDeath? -
cruising - 15.08.2010
Hello!
how to give score for player who kills a player in a vehicle? and do i put it in OnVehicleDeath or in OnPlayerDeath?
Re: OnVehicleDeath - OnPlayerDeath? -
Dark_Kostas - 15.08.2010
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
if(IsPlayerInAnyVehicle(playerid)) SetPlayerScore(killerid, GetPlayerScore(killerid)+1);
return 1;
}
Re: OnVehicleDeath - OnPlayerDeath? -
ikey07 - 15.08.2010
OnPlayerDeath
if(IsPlayerInAnyVehicle playerid
score killerid ++
Re: OnVehicleDeath - OnPlayerDeath? -
Dark_Kostas - 15.08.2010
Quote:
Originally Posted by ikey07
OnPlayerDeath
if(IsPlayerInAnyVehicle playerid
score killerid ++
|
I didnt understand what exactly he wanted. Edited
Re: OnVehicleDeath - OnPlayerDeath? -
cruising - 15.08.2010
Quote:
Originally Posted by Dark_Kostas
I didnt understand what exactly he wanted. Edited
|
I mean if you are in a vehicle and i kill you, i got +1 in score
that you told me didnt work, or i did put in in wrong place
Код:
public OnPlayerDeath(playerid, killerid, reason)
{
new cadena[256];
new name[MAX_PLAYER_NAME];
new name2[MAX_PLAYER_NAME];
new Float:px,Float:py,Float:pz;
SendDeathMessage(killerid, playerid, reason);
GetPlayerPos(playerid, px, py, pz);
gPlayerSpawned[playerid] = 0;
GetPlayerName(playerid, name, sizeof(name));
GetPlayerName(killerid, name2, sizeof(name2));
/*if(PlayerInfo[playerid][pGang] != PlayerInfo[killerid][pGang])
{*/
PlayerInfo[killerid][pKills] += 1;
PlayerInfo[playerid][pDeaths] += 1;
format(cadena,255,"%s killed %s",name2,name);
SendClientMessageToAll(COLOR_NICERED, cadena);
if(IsPlayerInAnyVehicle(playerid)) SetPlayerScore(killerid, GetPlayerScore(killerid)+1);
return 1;
}
Re: OnVehicleDeath - OnPlayerDeath? -
cruising - 15.08.2010
Quote:
Originally Posted by ikey07
OnPlayerDeath
if(IsPlayerInAnyVehicle playerid
score killerid ++
|
Cant get that to work