I need your help! - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: I need your help! (
/showthread.php?tid=607148)
I need your help! -
canip - 15.05.2016
Hi SA-Forum.
I get 26 errors when i try to paste
Код:
if(PInfo[playerid][pCop] >= 3) {
This is the command, that i want to paste it in
Код:
COMMAND:callsign(playerid,params[])
{
if(PInfo[playerid][pCop] >= 3) {
new veh = GetPlayerVehicleID(playerid);
if(IsPlayerInAnyVehicle(playerid))
{
if(isnull(params)) return SendClientMessage(playerid,COLOR_ORANGE,"INFO: {FFFFFF}/callsign [text]");
if(!veicolo_callsign_status[veh])
{
new string[128];
format(string,sizeof(string), "%s",params);
veicolo_callsign_testo[veh] = Create3DTextLabel(string, 0xFFFFFFFF, 0.0, 0.0, 0.0, 50.0, 0, 1);
Attach3DTextLabelToVehicle( veicolo_callsign_testo[veh], veh, -0.7, -1.9, -0.3);
veicolo_callsign_status[veh] = 1;
}
else
{
Delete3DTextLabel(veicolo_callsign_testo[veh]);
veicolo_callsign_status[veh] = 0;
return 1;
}
}
else
{
SendClientMessage(playerid,COLOR_ORANGE,"ERROR: {FFFFFF}You are not in a vehicle");
}
return 1;
}
Thanks for your help
Re: I need your help! -
MBilal - 15.05.2016
Fixed use this one You was missing }
Код:
COMMAND:callsign(playerid,params[])
{
if(PInfo[playerid][pCop] >= 3)
{
new veh = GetPlayerVehicleID(playerid);
if(IsPlayerInAnyVehicle(playerid))
{
if(isnull(params)) return SendClientMessage(playerid,COLOR_ORANGE,"INFO: {FFFFFF}/callsign [text]");
if(!veicolo_callsign_status[veh])
{
new string[128];
format(string,sizeof(string), "%s",params);
veicolo_callsign_testo[veh] = Create3DTextLabel(string, 0xFFFFFFFF, 0.0, 0.0, 0.0, 50.0, 0, 1);
Attach3DTextLabelToVehicle( veicolo_callsign_testo[veh], veh, -0.7, -1.9, -0.3);
veicolo_callsign_status[veh] = 1;
}
else
{
Delete3DTextLabel(veicolo_callsign_testo[veh]);
veicolo_callsign_status[veh] = 0;
return 1;
}
}
else
{
SendClientMessage(playerid,COLOR_ORANGE,"ERROR: {FFFFFF}You are not in a vehicle");
}
}
return 1;
}
Re: I need your help! -
Eymeric69 - 15.05.2016
you need to move the call back '{' under "if" i think that is why you get errors
Re: I need your help! -
canip - 15.05.2016
Thanks for the help. It worked
Re: I need your help! -
AndreT - 15.05.2016
Lookinag at your 'veicolo_callsign_status' array, it gives me a question:
is it only being used for values 0/1 to designate whether a 3D text label has been created?
If so, why not use the 'veicolo_callsign_testo' array itself? If the veicolo_callsign_testo is not 0, it means a 3D text label is created.