OnPlayerDeath e OnPlayerSpawn problem
#1

Hello! I have a problem with my GameMode. I would that when a player dies, it will be spawned. But in my GameMode, when a player dies, it doesn't spawn and the main screen "<< >> Spawn" appears (and sometimes, players has a bottle or a cigar in the hand). Here the script:

pawn Код:
public OnPlayerSpawn(playerid)
{
    SetPlayerHealth(playerid,100);
    SetPlayerArmour(playerid,100);
    GivePlayerWeapon(playerid,3,1);
    GivePlayerWeapon(playerid,24,140);
    GivePlayerWeapon(playerid,25,20);
    GivePlayerWeapon(playerid,29,350);
    GivePlayerWeapon(playerid,41,1000);
    //TextDrawShowForPlayer(playerid,Orologio);
    //gettime(Ore,Minuti);
    //SetPlayerTime(playerid,Ore,Minuti);
    return 1;
}
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    SendDeathMessage(killerid, playerid, reason);
    //TextDrawHideForPlayer(playerid,Orologio);
    SalvaStats(playerid);
    return 1;
}
SalvaStats(playerid) function:
pawn Код:
stock SalvaStats(playerid)
{
    format(query,sizeof(query),"UPDATE `users` SET `Rango` = '%s', `Gruppo` = '%d', `Skin` = '%d', `LastLoginInGame` = '%s', `Ban` = '%d', `Ip` = '%s' WHERE `Username` = '%s'",stats[playerid][Rango],stats[playerid][Gruppo],stats[playerid][Skin],stats[playerid][LastLoginInGame],stats[playerid][ban],stats[playerid][Ip],stats[playerid][Username]);
    mysql_query(query);
}
How can I fix that? Thank you in advance!
(And sorry for my English)
Reply


Messages In This Thread
OnPlayerDeath e OnPlayerSpawn problem - by SteveH. - 02.09.2013, 10:47
Re: OnPlayerDeath e OnPlayerSpawn problem - by Konstantinos - 02.09.2013, 10:52
Re: OnPlayerDeath e OnPlayerSpawn problem - by SteveH. - 02.09.2013, 10:59
Re: OnPlayerDeath e OnPlayerSpawn problem - by Konstantinos - 02.09.2013, 11:01
Re: OnPlayerDeath e OnPlayerSpawn problem - by SteveH. - 02.09.2013, 11:21

Forum Jump:


Users browsing this thread: 1 Guest(s)