OnPlayerDeath gives money
#1

what could be the problem , when the player dies, it doubles the players money

PHP код:
public OnPlayerDeath(playeridkilleridreason)
{
    
user.priesmirti[playerid] = GetPlayerMoney(playerid);
    
GivePlayerMoney(playerid, -GetPlayerMoney(playerid));
    
SetTimerEx("mire"3000false,"i"playerid);
    return 
1;

PHP код:
public mire(playerid)
{
    
GivePlayerMoney(playeriduser.priesmirti[playerid]);
    
user.priesmirti[playerid] = 0;
    
SetPlayerPos(playerid, -2664.7725,635.7092,14.4531);
    return 
1;

tried it without the user.priesmirti enum but still gives double money
Reply
#2

Maybe you have
Код:
GivePlayerMoney(playerid, user.priesmirti[playerid]);
under OnPlayerSpawn.
Reply
#3

no, there are no other giveplayermoneys on playerspawn
Reply
#4

Quote:
Originally Posted by Kevinas100
Посмотреть сообщение
what could be the problem , when the player dies, it doubles the players money

PHP код:
public OnPlayerDeath(playeridkilleridreason)
{
    
user.priesmirti[playerid] = GetPlayerMoney(playerid);
    
GivePlayerMoney(playerid, -GetPlayerMoney(playerid));
    
SetTimerEx("mire"3000false,"i"playerid);
    return 
1;

PHP код:
public mire(playerid)
{
    
GivePlayerMoney(playeriduser.priesmirti[playerid]);
    
user.priesmirti[playerid] = 0;
    
SetPlayerPos(playerid, -2664.7725,635.7092,14.4531);
    return 
1;

tried it without the user.priesmirti enum but still gives double money
PHP код:
public mire(playerid

    
GivePlayerMoney(playeriduser.priesmirti[playerid]); 
    
user.priesmirti[playerid] = 0;
    
SetPlayerPos(playerid, -2664.7725,635.7092,14.4531); 
    return 
1

to

PHP код:
public mire(playerid

    
user.priesmirti[playerid] = 0
    
GivePlayerMoney(playeriduser.priesmirti[playerid]); 
    
SetPlayerPos(playerid, -2664.7725,635.7092,14.4531); 
    return 
1

Reply
#5

Can you show me your OnPlayerSpawn?
Reply
#6

Quote:
Originally Posted by Libbyphay
Посмотреть сообщение
PHP код:
public mire(playerid

    
GivePlayerMoney(playeriduser.priesmirti[playerid]); 
    
user.priesmirti[playerid] = 0;
    
SetPlayerPos(playerid, -2664.7725,635.7092,14.4531); 
    return 
1

to

PHP код:
public mire(playerid

    
user.priesmirti[playerid] = 0
    
GivePlayerMoney(playeriduser.priesmirti[playerid]); 
    
SetPlayerPos(playerid, -2664.7725,635.7092,14.4531); 
    return 
1

helped, thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)