How to fix this?Please help!
#1

How to fix this?Please help!
Here are the foto's:
When i kill somewho or myself it's type here that i make 2 kills..
http://prntscr.com/5bfv4c
and when i death i am maked to lose 10.000$,but when i respawn it's again 10.000$
http://prntscr.com/5bfvgr , http://prntscr.com/5bfw0k

please help! i need this to fix fast...
Thanks all who is tryed to help me!

P.S
Sorry i don't know good speak English i am from Bosnia & Herzegovinia
Reply
#2

How about you post the OnPlayerDeath code tho?

P.S: I'm from croatia. Skype: gf.niksy
Reply
#3

Quote:

public OnPlayerDeath(playerid, killerid, reason)
{
SendDeathMessage(killerid, playerid, reason);
if(killerid != INVALID_PLAYER_ID) SetPlayerScore(killerid, GetPlayerScore(playerid));
new playercash;
if(killerid == INVALID_PLAYER_ID) {
SendDeathMessage(INVALID_PLAYER_ID,playerid,reason );
ResetPlayerMoney(playerid);
} else {
SendDeathMessage(killerid,playerid,reason);
SetPlayerScore(killerid,GetPlayerScore(killerid)+1 );
playercash = GetPlayerMoney(playerid);
if (playercash > 0) {
GivePlayerMoney(killerid, playercash);
ResetPlayerMoney(playerid);
}
else
{
}
}
PlayerInfo[killerid][pUbojstva]++;
PlayerInfo[playerid][pSmrti]++;

return 1;
}

And how to make when i kill someone to get one score per kill 1+ and not like a score by money
Reply
#4

Код:
public OnPlayerDeath(playerid, killerid, reason)
{
	if(killerid == INVALID_PLAYER_ID)
	{
		SendDeathMessage(INVALID_PLAYER_ID,playerid,reason);
	}
	else
	{
		SendDeathMessage(killerid,playerid,reason);
		SetPlayerScore(killerid,GetPlayerScore(killerid)+1);
		PlayerInfo[killerid][pUbojstva]++;
		PlayerInfo[playerid][pSmrti]++;
	}
	return 1;
}
Reply
#5

Thanks,i gived you REP..

i prihvati me na skype poslije da te pitam nesto u vezi skriptanja mislim da te pitam da li bi mi to napravio...(ako nemozes/nemas vremena nema veze )
Reply
#6

:/ i'ts fixed one problem but here it's another :/
i when i die now i get another 10.000$
http://prntscr.com/5bi64t

P.S how to fix that "Dobro Dosli..."(to only one time be not when everytime when i die)

please help me i will REP who will fix my problem..
Reply
#7

Put this under OnPlayerConnect, not under OnPlayerDeath
Reply
#8

Quote:
Originally Posted by Dizzle
Посмотреть сообщение
Put this under OnPlayerConnect, not under OnPlayerDeath
I don't have nothing on OnPlayerDeath see..
Quote:

public OnPlayerDeath(playerid, killerid, reason)
{
if(killerid == INVALID_PLAYER_ID)
{
SendDeathMessage(INVALID_PLAYER_ID,playerid,reason );
}
else
{
SendDeathMessage(killerid,playerid,reason);
SetPlayerScore(killerid,GetPlayerScore(killerid)+1 );
PlayerInfo[killerid][pUbojstva]++;
PlayerInfo[playerid][pSmrti]++;
}
return 1;
}

i will REP you if you help me this problem to fix......
Reply
#9

Check if theres "Dobro dosli" under OnPlayerSpawn also, remove it from there and add it under OnPlayerConnect so it will show only once when a player connects to the server.
Reply
#10

Quote:
Originally Posted by Dizzle
Посмотреть сообщение
Check if theres "Dobro dosli" under OnPlayerSpawn also, remove it from there and add it under OnPlayerConnect so it will show only once when a player connects to the server.
Thanks,i gived you REP...can you fix my other problem too? this with money?
But thanks a lot for this problem tooo.........
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)