OnVehicleDeath - OnPlayerDeath?
#1

Hello!

how to give score for player who kills a player in a vehicle? and do i put it in OnVehicleDeath or in OnPlayerDeath?
Reply
#2

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    if(IsPlayerInAnyVehicle(playerid)) SetPlayerScore(killerid, GetPlayerScore(killerid)+1);
    return 1;
}
Reply
#3

OnPlayerDeath

if(IsPlayerInAnyVehicle playerid

score killerid ++
Reply
#4

Quote:
Originally Posted by ikey07
Посмотреть сообщение
OnPlayerDeath

if(IsPlayerInAnyVehicle playerid

score killerid ++
I didnt understand what exactly he wanted. Edited
Reply
#5

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;
}
Reply
#6

Quote:
Originally Posted by ikey07
Посмотреть сообщение
OnPlayerDeath

if(IsPlayerInAnyVehicle playerid

score killerid ++
Cant get that to work
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)