[SOLVED] -
MrWupiazZzLT - 29.06.2014
Hey guys I need help! I doing new gamemode and i very need some help!! So.. I did Derby GameMode and now i did client message to killerid and when some player fall in water and suicide playerid getting killerid's score and money here it is script ! OHHH AND ANOTHER PROBLEM THAT I DONT GET THE SCORE ANYWAYS!!
Код:
public OnPlayerDeath(playerid, killerid, reason)
{
new currentveh;
currentveh = GetPlayerVehicleID(playerid);
DestroyVehicle(currentveh);
SetPlayerScore(killerid,GetPlayerScore(playerid)+10);
SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}Yay! For killing you got {FFFFFF}+10 Score{FF0000}! LETS KILL MORE!");
return 1;
}
Re: Need help with this script please! -
MrWupiazZzLT - 29.06.2014
Anyone
Re: Need help with this script please! -
PrivatioBoni - 29.06.2014
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
if(killerid != INVALID_PLAYER_ID)
{
new currentveh;
currentveh = GetPlayerVehicleID(playerid);
DestroyVehicle(currentveh);
SetPlayerScore(killerid,GetPlayerScore(killerid)+10);
SendClientMessage(killerid, 0xFFFFFFFF, "{FF0000}Yay! For killing you got {FFFFFF}+10 Score{FF0000}! LETS KILL MORE!");
}
return 1;
}
Changes:
Some "playerid" changed to "killerid"
Added code to check if the "killerid" is valid.
P.S - bumps need to be after 24hours+.
Re: Need help with this script please! -
MrWupiazZzLT - 29.06.2014
Quote:
Originally Posted by PrivatioBoni
pawn Код:
public OnPlayerDeath(playerid, killerid, reason) { if(killerid != INVALID_PLAYER_ID) { new currentveh; currentveh = GetPlayerVehicleID(playerid); DestroyVehicle(currentveh); SetPlayerScore(killerid,GetPlayerScore(killerid)+10); SendClientMessage(killerid, 0xFFFFFFFF, "{FF0000}Yay! For killing you got {FFFFFF}+10 Score{FF0000}! LETS KILL MORE!"); } return 1; }
Changes:
Some "playerid" changed to "killerid"
Added code to check if the "killerid" is valid.
P.S - bumps need to be after 24hours+.
|
So thats mean that now this wont bugging? Or you changed killerid to playerid so killerid will be playerid
Re: Need help with this script please! -
PrivatioBoni - 29.06.2014
I meant I changed it to what you had on your code before.
For reference, in this case:
killerid = the person who made the kill which caused the callback to be called
playerid = the victim
For the score, you got the score of the victim and gave it to the killer and added 10.
Also, you sent a message to the victim saying they killed someone, which is wrong.
Try it and see if it works better, including the killerid != INVALID_PLAYER_ID code (which checks if the killer is a valid player).
Re: Need help with this script please! -
MrWupiazZzLT - 29.06.2014
Quote:
Originally Posted by PrivatioBoni
I meant I changed it to what you had on your code before.
For reference, in this case:
killerid = the person who made the kill which caused the callback to be called
playerid = the victim
For the score, you got the score of the victim and gave it to the killer and added 10.
Also, you sent a message to the victim saying they killed someone, which is wrong.
Try it and see if it works better, including the killerid != INVALID_PLAYER_ID code (which checks if the killer is a valid player).
|
Ok thanks i have one more question if i will kill someone will i get +10 score? [Becouse it didnt worked before when it were bugged and where i killed myself i didnt got that but system said i got it...
Re: Need help with this script please! -
MrWupiazZzLT - 29.06.2014
Hello?
Re: Need help with this script please! -
PrivatioBoni - 29.06.2014
Try and see for yourself. From what I see it should be fine.
I already said not to bump so impatiently yet you did it again. It puts you in very bad light and it's not fun helping somebody like that.
This is a forum not a shoutbox.
Re: Need help with this script please! -
MrWupiazZzLT - 29.06.2014
Quote:
Originally Posted by PrivatioBoni
Try and see for yourself. From what I see it should be fine.
|
But mine wifi now don't support other ips so i doing some scripts then giving them but i think its fine becouse it don't gave me becouse i were deleted it
Anyways thanks +1 for you!