I need your help!
#1

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
Reply
#2

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;
}
Reply
#3

you need to move the call back '{' under "if" i think that is why you get errors
Reply
#4

Thanks for the help. It worked
Reply
#5

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)