Mensaje al subir? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Español/Spanish (
https://sampforum.blast.hk/forumdisplay.php?fid=29)
+---- Thread: Mensaje al subir? (
/showthread.php?tid=555508)
Mensaje al subir? -
Zodiaco - 08.01.2015
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);
Re: Mensaje al subir? -
SickAttack - 08.01.2015
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;
}
Respuesta: Re: Mensaje al subir? -
Zodiaco - 08.01.2015
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
Respuesta: Mensaje al subir? -
OTACON - 08.01.2015
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;
}
Respuesta: Mensaje al subir? -
Zodiaco - 08.01.2015
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