commands not working
#5

PHP код:
//CALLSIGN FILTERSCRIPT
#define FILTERSCRIPT

#include <a_samp>
#include <zcmd>
#include <sscanf2>
#define COLOR_ORANGE 0xFF9500FF

//******VARIABILI******//
new Text3D:veicolo_callsign_testo[MAX_VEHICLES];
new 
veicolo_callsign_status[MAX_VEHICLES];

public 
OnPlayerDeath(playeridkilleridreason)
{
    new 
veh GetPlayerVehicleID(playerid);
    
Delete3DTextLabel(veicolo_callsign_testo[veh]);
    
veicolo_callsign_status[veh] = 0;
    return 
1;
}

public 
OnVehicleDeath(vehicleidkillerid)
{
    new 
veh GetPlayerVehicleID(vehicleid);
    
Delete3DTextLabel(veicolo_callsign_testo[veh]);
    
veicolo_callsign_status[veh] = 0;
    return 
1;
}

#pragma tabsize 0
COMMAND:callsign(playerid,params[])
{
    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(string0xFFFFFFFF0.00.00.050.001);
           
Attach3DTextLabelToVehicleveicolo_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;
        }
    return 
1;
}

COMMAND:deletecallsign(playerid,params[])
{
    new 
veh GetPlayerVehicleID(playerid);
    if(
IsPlayerInAnyVehicle(playerid))
    {
        
Delete3DTextLabel(veicolo_callsign_testo[veh]);
        
veicolo_callsign_status[veh] = 0;
    }
    else
    {
    
SendClientMessage(playerid,COLOR_ORANGE,"ERROR: {FFFFFF}You are not in a vehicle");
    }
    return 
1;

Reply


Messages In This Thread
commands not working - by BadJih - 15.09.2017, 18:24
Re: commands not working - by cuber - 15.09.2017, 18:45
Re: commands not working - by Meller - 15.09.2017, 18:55
Re: commands not working - by BadJih - 15.09.2017, 19:02
Re: commands not working - by cuber - 15.09.2017, 19:16
Re: commands not working - by Dayrion - 15.09.2017, 19:36
Re: commands not working - by Jeroen52 - 15.09.2017, 19:40
Re: commands not working - by cuber - 15.09.2017, 19:41
Re: commands not working - by BadJih - 15.09.2017, 22:25
Re: commands not working - by cuber - 15.09.2017, 23:07

Forum Jump:


Users browsing this thread: 1 Guest(s)