18.12.2013, 17:56
pawn Код:
#include <a_samp>
new Text:TextoVehiculo[2];
public OnFilterScriptInit(){
TextoVehiculo[0] = TextDrawCreate(645.000000, 421.000000, "_");
TextDrawBackgroundColor(TextoVehiculo[0], 255);
TextDrawFont(TextoVehiculo[0], 1);
TextDrawLetterSize(TextoVehiculo[0], 0.500000, 1.000000);
TextDrawColor(TextoVehiculo[0], -1);
TextDrawSetOutline(TextoVehiculo[0], 0);
TextDrawSetProportional(TextoVehiculo[0], 1);
TextDrawSetShadow(TextoVehiculo[0], 1);
TextDrawUseBox(TextoVehiculo[0], 1);
TextDrawBoxColor(TextoVehiculo[0], 255);
TextDrawTextSize(TextoVehiculo[0], -12.000000, 0.000000);
TextoVehiculo[1] = TextDrawCreate(190.000000, 421.000000, "Preciona N para encender o apagar el motor");
TextDrawBackgroundColor(TextoVehiculo[1], 255);
TextDrawFont(TextoVehiculo[1], 1);
TextDrawLetterSize(TextoVehiculo[1], 0.330000, 1.200000);
TextDrawColor(TextoVehiculo[1], -16776961);
TextDrawSetOutline(TextoVehiculo[1], 0);
TextDrawSetProportional(TextoVehiculo[1], 1);
TextDrawSetShadow(TextoVehiculo[1], 1);
return true;
}
public OnPlayerStateChange(playerid, newstate, oldstate){
switch(GetPlayerState(playerid)){
case PLAYER_STATE_DRIVER:{
TextDrawShowForPlayer(playerid,TextoVehiculo[0]);
TextDrawShowForPlayer(playerid,TextoVehiculo[1]);
SetTimerEx("SacarTexdraw", 15*1000, false, "d", playerid);
}
case PLAYER_STATE_ONFOOT:{
CallLocalFunction("SacarTexdraw", "d", playerid);
}
}
return true;
}
forward SacarTexdraw(playerid);
public SacarTexdraw(playerid){
TextDrawHideForPlayer(playerid,TextoVehiculo[0]);
TextDrawHideForPlayer(playerid,TextoVehiculo[1]);
}
