їSe bugea al morir?
#4

Para hacer eso vas a necesitar saber si el jugador estб editando o no; y al morir, si estб editando usas CancelEdit y destruyes el objeto. Para lo primero podrнas usar una variable booleana.

Serнa algo asн:

pawn Код:
new bool:EstaEditando[MAX_PLAYERS];

// En algъn comando o lugar donde uses EditObject...
EditObject(playerid, objectid);
EstaEditando[playerid] = true;
pawn Код:
// Cuando el jugador muera...
public OnPlayerDeath(playerid, killerid, reason)
{
    // їEsta editando algъn objeto?
    if(EstaEditando[playerid])
    {
        // Cancelamos la ediciуn del objeto
        CancelEdit(playerid);
        EstaEditando[playerid] = false;

        // Informamos al jugador acerca de esto
        SendClientMessage(playerid, 0xFF0000FF, "INFO: ЎHas muerto mientras estabas editando un objeto!");
        SendClientMessage(playerid, 0xFF0000FF, "INFO: La ediciуn ha sido cancelada.");

        // Destruimos el objeto que se estaba editando
        DestroyObject(objectid);    
    }
    return true;
}
Reply


Messages In This Thread
їSe bugea al morir? - by Pipe98 - 29.11.2014, 21:13
Respuesta: їSe bugea al morir? - by Yerro - 29.11.2014, 22:00
Respuesta: їSe bugea al morir? - by Pipe98 - 29.11.2014, 22:38
Respuesta: їSe bugea al morir? - by hotspicytaco - 29.11.2014, 23:00
Respuesta: їSe bugea al morir? - by Pipe98 - 30.11.2014, 00:24
Respuesta: їSe bugea al morir? - by hotspicytaco - 30.11.2014, 00:52
Respuesta: їSe bugea al morir? - by Pipe98 - 30.11.2014, 01:03

Forum Jump:


Users browsing this thread: 1 Guest(s)