pawn Код:
new Text3D:TextVeH[MAX_VEHICLES];
//OnPlayerStateChange
for(new i=0; i < MAXIMODEPLAYERS; i++)
{
if(GetPlayerVehicleID(playerid) == JogadorInfo[i][pCarid])
{
if(JogadorInfo[i][pCarid] != JogadorInfo[playerid][pCarid])
SendClientMessage(playerid,COR_VERMELHA,"Este veнculo tem dono, porйm pode ser puxado a qualquer momento!");
}
if(newstate == PLAYER_STATE_DRIVER && GetPlayerVehicleID(JogadorInfo[i][pCarid]))
{
Update3DTextLabelText(TextVeH[GetPlayerVehicleID(playerid)], 0xFFFFFFFF, " ");
EscondeuAText[playerid] = true;
}
if(oldstate == PLAYER_STATE_DRIVER && EscondeuAText[playerid])
{
new gstring[256];
format(gstring, 256, "Veнculo de %s\n[ID:%d]", pName(JogadorInfo[playerid][pCarid]), JogadorInfo[playerid][pCarid]);
Update3DTextLabelText(TextVeH[GetPlayerVehicleID(playerid)], 0xFF9900FF, gstring);
EscondeuAText[playerid] = false;
}
}
stock CriarCarro(modeloid, playerid)
{
DestroyVehicle(JogadorInfo[playerid][pCarid]);
JogadorInfo[playerid][pCarid] = -1;
new Float:pxc = 0.000000, Float:pyc = 0.000000, Float:pzc = 0.000000;
GetPlayerPos(playerid, pxc, pyc, pzc);
Delete3DTextLabel(TextVeH[GetPlayerVehicleID(playerid)]);
SetVehicleNumberPlate(JogadorInfo[playerid][pCarid], "[SaW Clг]");
JogadorInfo[playerid][pCarid] = CreateVehicle(modeloid, pxc,pyc,pzc, random(360), -1, -1, -1);
PutPlayerInVehicle(playerid, JogadorInfo[playerid][pCarid], 0);
DestroyObject(GetPVarInt(playerid, "neon"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon1"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon2"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon3"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon4"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon5"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon6"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon7"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon8"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon9"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon10"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon11"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon12"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon13"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "interior"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "interior1"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "back"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "back1"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "front"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "front1"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "undercover"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "undercover1"));
DeletePVar(playerid, "Status");
for (new i = 0; i < MAXIMODEPLAYERS; i++) SetVehicleParamsForPlayer(JogadorInfo[playerid][pCarid], i, 0, 0);
return 1;
}