Mensaje al subir?
#1

Hola amigos del samp aquн con otra de mis ideas..

Para subir a un auto me saldrнa un mensaje como este:

pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{

GameTextForPlayer(playerid,"~w~Subiste ~n~~r~~h~a tu auto, estas seguro",5000,3);
return 1;
}

y al bajar del auto donde tendrнa que poner para que me salga este mensaje?


pawn Код:
GameTextForPlayer(playerid,"~w~Bajastes  ~n~~r~~h~de tu auto zona peligrosa.",5000,3);
Reply
#2

En el callback: "public OnPlayerExitVehicle(playerid, vehicleid)".

pawn Код:
public OnPlayerExitVehicle(playerid, vehicleid)
{
    GameTextForPlayer(playerid,"~w~Bajastes  ~n~~r~~h~de tu auto zona peligrosa.",5000,3);
    return 1;
}
Reply
#3

Quote:
Originally Posted by SickAttack
Посмотреть сообщение
En el callback: "public OnPlayerExitVehicle(playerid, vehicleid)".

pawn Код:
public OnPlayerExitVehicle(playerid, vehicleid)
{
    GameTextForPlayer(playerid,"~w~Bajastes  ~n~~r~~h~de tu auto zona peligrosa.",5000,3);
    return 1;
}
muchas gracias amigo +rept
Reply
#4

te recomiendo OnPlayerStateChange.

saludos.

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate){
    if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER){
        GameTextForPlayer(playerid,"~w~Subiste ~n~~r~~h~a tu auto, estas seguro",5000,3);
    }
    if(oldstate == PLAYER_STATE_DRIVER || oldstate == PLAYER_STATE_PASSENGER && newstate == PLAYER_STATE_ONFOOT){
        GameTextForPlayer(playerid,"~w~Bajastes  ~n~~r~~h~de tu auto zona peligrosa.",5000,3);
    }
    return true;
}
Reply
#5

Quote:
Originally Posted by OTACON
Посмотреть сообщение
te recomiendo OnPlayerStateChange.

saludos.

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate){
    if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER){
        GameTextForPlayer(playerid,"~w~Subiste ~n~~r~~h~a tu auto, estas seguro",5000,3);
    }
    if(oldstate == PLAYER_STATE_DRIVER || oldstate == PLAYER_STATE_PASSENGER && newstate == PLAYER_STATE_ONFOOT){
        GameTextForPlayer(playerid,"~w~Bajastes  ~n~~r~~h~de tu auto zona peligrosa.",5000,3);
    }
    return true;
}
*.* muchas gracias ire a probar
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)