22.04.2016, 12:10
Hi, I have a problem with callsign system.
This system can work properly but when you added a callsign successfully, the callsign will disappears sometime.
I can't find out why it disappears but it disappears.
Thank you for your time, details here:
COMMAND:callsign(playerid, params[])
{
new tmpcar = GetPlayerVehicleID(playerid);
if(GetPVarInt(playerid, "Member") == 0 || GetPVarInt(playerid, "Member") == 1 || GetPVarInt(playerid, "Member") == 2 || GetPVarInt(playerid, "Member") == 3 || GetPVarInt(playerid, "Member") == 5 || GetPVarInt(playerid, "Member") == 6) return SendClientMessage(playerid, COLOR_WHITE, "[ERROE]:You are not a Law Enforcement Officer.");
if(IsPlayerInAnyVehicle(playerid))
{
if(isnull(params)) return SendClientMessage(playerid, COLOR_WHITE,"用法: /callsign [内容]");
if(veicolo_callsign_status[tmpcar] == 0)
{
veicolo_callsign_testo[tmpcar] = Create3DTextLabel(params, 0xFFFFFFFF, 0.0, 0.0, 0.0, 15.0, 0, 1);
Attach3DTextLabelToVehicle(veicolo_callsign_testo[tmpcar], tmpcar, -0.7, -1.9, -0.3);
veicolo_callsign_status[tmpcar] = 1;
SendClientMessage(playerid, 0xFFFFFFFF ,"[LAW]Callsign added.");
}
else
{
Delete3DTextLabel(veicolo_callsign_testo[tmpcar]);
veicolo_callsign_status[tmpcar] = 0;
SendClientMessage(playerid, 0xFFFFFFFF ,"[LAW]Callsign removed.");
}
}
else
{
SendClientMessage(playerid,0xFFFFFFFF,"You need to be in a vehicle.");
}
return 1;
}
This system can work properly but when you added a callsign successfully, the callsign will disappears sometime.
I can't find out why it disappears but it disappears.
Thank you for your time, details here:
COMMAND:callsign(playerid, params[])
{
new tmpcar = GetPlayerVehicleID(playerid);
if(GetPVarInt(playerid, "Member") == 0 || GetPVarInt(playerid, "Member") == 1 || GetPVarInt(playerid, "Member") == 2 || GetPVarInt(playerid, "Member") == 3 || GetPVarInt(playerid, "Member") == 5 || GetPVarInt(playerid, "Member") == 6) return SendClientMessage(playerid, COLOR_WHITE, "[ERROE]:You are not a Law Enforcement Officer.");
if(IsPlayerInAnyVehicle(playerid))
{
if(isnull(params)) return SendClientMessage(playerid, COLOR_WHITE,"用法: /callsign [内容]");
if(veicolo_callsign_status[tmpcar] == 0)
{
veicolo_callsign_testo[tmpcar] = Create3DTextLabel(params, 0xFFFFFFFF, 0.0, 0.0, 0.0, 15.0, 0, 1);
Attach3DTextLabelToVehicle(veicolo_callsign_testo[tmpcar], tmpcar, -0.7, -1.9, -0.3);
veicolo_callsign_status[tmpcar] = 1;
SendClientMessage(playerid, 0xFFFFFFFF ,"[LAW]Callsign added.");
}
else
{
Delete3DTextLabel(veicolo_callsign_testo[tmpcar]);
veicolo_callsign_status[tmpcar] = 0;
SendClientMessage(playerid, 0xFFFFFFFF ,"[LAW]Callsign removed.");
}
}
else
{
SendClientMessage(playerid,0xFFFFFFFF,"You need to be in a vehicle.");
}
return 1;
}