commands not working
#1

when i load this FS https://pastebin.com/raw/mXzGuj31
all server commands not working and only the FS commands works

solution ? i removed the #define filtrescript and same problem
Reply
#2

Try this?
PHP код:
//CALLSIGN FILTERSCRIPT
#define FILTERSCRIPT

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

public OnFilterScriptInit()
{
    print(
"\n--------------------------------------");
    print(
" CALLSIGN SCRIPT DAVMAN");
    print(
"--------------------------------------\n");
    return 
1;
}

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

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

public 
OnPlayerRequestClass(playeridclassid)
{
    
SetPlayerPos(playerid1958.37831343.157215.3746);
    
SetPlayerCameraPos(playerid1958.37831343.157215.3746);
    
SetPlayerCameraLookAt(playerid1958.37831343.157215.3746);
    return 
1;
}

public 
OnPlayerConnect(playerid)
{
    
SendClientMessage(playerid,COLOR_ORANGE,"INFO: {FFFFFF}This server use Callsign Filterscript Davman");
    return 
1;
}

public 
OnPlayerDisconnect(playeridreason)
{
    return 
1;
}

public 
OnPlayerSpawn(playerid)
{
    return 
1;
}

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

public 
OnVehicleSpawn(vehicleid)
{
    return 
1;
}

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

public 
OnPlayerText(playeridtext[])
{
    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
#3

Why did you just create another thread for the same issue? Stick to your first one.
Reply
#4

Quote:
Originally Posted by cuber
Посмотреть сообщение
Try this?
PHP код:
//CALLSIGN FILTERSCRIPT
#define FILTERSCRIPT
#include <a_samp>
#include <zcmd>
#include <sscanf2>
#define COLOR_ORANGE 0xFF9500FF
public OnFilterScriptInit()
{
    print(
"\n--------------------------------------");
    print(
" CALLSIGN SCRIPT DAVMAN");
    print(
"--------------------------------------\n");
    return 
1;
}
public 
OnFilterScriptExit()
{
    new 
veh GetPlayerVehicleID(playerid);
    
Delete3DTextLabel(veicolo_callsign_testo[veh]);
    
veicolo_callsign_status[veh] = 0;
    return 
1;
}
//******VARIABILI******//
new Text3D:veicolo_callsign_testo[MAX_VEHICLES];
new 
veicolo_callsign_status[MAX_VEHICLES];
public 
OnPlayerRequestClass(playeridclassid)
{
    
SetPlayerPos(playerid1958.37831343.157215.3746);
    
SetPlayerCameraPos(playerid1958.37831343.157215.3746);
    
SetPlayerCameraLookAt(playerid1958.37831343.157215.3746);
    return 
1;
}
public 
OnPlayerConnect(playerid)
{
    
SendClientMessage(playerid,COLOR_ORANGE,"INFO: {FFFFFF}This server use Callsign Filterscript Davman");
    return 
1;
}
public 
OnPlayerDisconnect(playeridreason)
{
    return 
1;
}
public 
OnPlayerSpawn(playerid)
{
    return 
1;
}
public 
OnPlayerDeath(playeridkilleridreason)
{
    new 
veh GetPlayerVehicleID(playerid);
    
Delete3DTextLabel(veicolo_callsign_testo[veh]);
    
veicolo_callsign_status[veh] = 0;
    return 
1;
}
public 
OnVehicleSpawn(vehicleid)
{
    return 
1;
}
public 
OnVehicleDeath(vehicleidkillerid)
{
    new 
veh GetPlayerVehicleID(vehicleid);
    
Delete3DTextLabel(veicolo_callsign_testo[veh]);
    
veicolo_callsign_status[veh] = 0;
    return 
1;
}
public 
OnPlayerText(playeridtext[])
{
    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;

callsign.pwn(19) : error 017: undefined symbol "playerid"
callsign.pwn(20) : error 017: undefined symbol "veicolo_callsign_testo"
callsign.pwn(21) : error 017: undefined symbol "veicolo_callsign_status"
Reply
#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
#6

I stopped reading the code after
Код:
#pragma tabsize 0
Reply
#7

Quote:
Originally Posted by Dayrion
Посмотреть сообщение
I stopped reading the code after
Код:
#pragma tabsize 0
You know that a script is shit when a programmer fixes a certain issue with #pragma tabsize 0.
Reply
#8

This guy just copied and pasted, plus failed. He didn't make this.
Reply
#9

Quote:
Originally Posted by cuber
Посмотреть сообщение
This guy just copied and pasted, plus failed. He didn't make this.
no i did all they said and still server commands stopsworkign when i load the FS
Reply
#10

Quote:
Originally Posted by BadJih
Посмотреть сообщение
no i did all they said and still server commands stopsworkign when i load the FS
Just copy the code and paste the code on your gamemode..
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)