12.02.2012, 09:51
nao estб fufando quando eu caio do veiculo ou saio naum aparece a text:
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER) {
for(new i; i < MAX_PLAYERS; i++) {
if(GetPlayerVehicleID(playerid) == VeiculoID[i]) {
if(GetPlayerVehicleID(playerid) == VeiculoID[playerid]) {
format(gstring, sizeof(gstring), "{EE3B3B}[INFO]: {FFFFFF}%s seja bem vindo ao seu veнculo criado por vocк.", PlayerName(playerid));
SendClientMessage(playerid, 0x9966FFAA, gstring);
Delete3DTextLabel(TextVeH[GetPlayerVehicleID(playerid)]);
}
else if(GetPlayerVehicleID(playerid) != VeiculoID[playerid]) {
if(GetPlayerVehicleID(playerid) == VeiculoID[i]) {
format(gstring, sizeof(gstring), "{EE3B3B}[INFO]: {FFFFFF}Esse veнculo pertence a '%s' e vocк nao pode dirigi-lo, use: {EE3B3B}/v {FFFFFF}para criar.", PlayerName(VeiculoID[playerid]));
SendClientMessage(playerid, 0xFF6633AA, gstring);
PlayerPlaySound(playerid, 1147, 0.0, 0.0, 0.0);
RemovePlayerFromVehicle(playerid);
}
else {
Update3DTextLabelText( TextVeH[ GetPlayerVehicleID( playerid ) ], -1, gstring );
}
}
if( oldstate == PLAYER_STATE_DRIVER ) {
if(GetPlayerVehicleID(playerid) == VeiculoID[i]) {
if(GetPlayerVehicleID(playerid) == VeiculoID[playerid]) {
format(gstring, 256, "{FFFACD}Veнculo de:\n{FFFFFF}%s {FFFACD}[ID:%d]",PlayerName(playerid), playerid);
TextVeH[GetPlayerVehicleID(playerid)] = Create3DTextLabel(gstring, -1, 0.0, 0.0, 0.0, 50.0, 0, 1);
Attach3DTextLabelToVehicle(TextVeH[GetPlayerVehicleID(playerid)], VeiculoID[playerid], 0.0, 0.0, 0.0+1);
Update3DTextLabelText( TextVeH[ GetPlayerVehicleID( playerid ) ], -1, gstring );
SendClientMessage(playerid, -1, "{EE3B3B}[INFO]: {FFFFFF}Voce pode puxar o seu veнculo ate voce usando: /trazerv");
}
}
}
}
}
}
return 1;
}