My gate system
#1

My own gate system works perfectly on my pc (samp-server)
but on my online server (host) not works The commands works but when I use /editgate open or /editgate close
cordinates of gate not changing.
I used EditObject & CreateObject etc...
Reply
#2

Show the commands maybe?
Reply
#3

PHP код:
CMD:editgate(playeridparams[])
{
    new 
file[256], pass[256];
    
pass dini_Get(file"Password");
    new 
Float:speed 0;
    if(
sscanf(params"s[128]"params)) return SendClientMessage(playerid, -1"USAGE:/editgate <speed || password || autogate || open || close>");
    if(!
strcmp(params"speed"true5))
    {
        new 
i;
        if(
HowManyGatesNearPlayer(playerid) == 0) return SendClientMessage(playerid, -1"You arn't near any gate");
        
WhichGateIsNearPlayer(playerid);
        
format(filesizeof(file), GATE_PATHi);
        if(
sscanf(params"s[128]f"paramsspeed)) return SendClientMessage(playerid, -1"USAGE:/editgate speed <speed>");
        
GInfo[i][Speed] = speed;
        
dini_FloatSet(file"Speed"speed);
        
SendClientMessage(playerid, -1"Gate's speed changed.");
    }
    if(!
strcmp(params"password"true8))
    {
        new 
i;
        if(
HowManyGatesNearPlayer(playerid) == 0) return SendClientMessage(playerid, -1"You arn't near any gate");
        
WhichGateIsNearPlayer(playerid);
        
format(filesizeof(file), GATE_PATHi);
        new 
pas[256];
        if(
sscanf(params"s[128]s[256]"paramspas)) return SendClientMessage(playerid, -1"USAGE:/editgate password <password>");
        
GInfo[i][Password] = pas;
        
dini_Set(file"Password"pas);
        
SendClientMessage(playerid, -1"Gate's password changed");
    }
    if(!
strcmp(params"autogate"true8))
    {
        new 
i;
        if(
HowManyGatesNearPlayer(playerid) == 0) return SendClientMessage(playerid, -1"You arn't near any gate");
        
WhichGateIsNearPlayer(playerid);
        
format(filesizeof(file), GATE_PATHi);
        new 
option;
        if(
sscanf(params"s[128]i"paramsoption)) return SendClientMessage(playerid, -1"USAGE:/editgate autogate <1=ON || 0= OFF>");
        if(!
strcmp(GInfo[i][Password], "None"true4))
        {
            
GInfo[i][Autogate] = option;
            
dini_IntSet(file"Autogate"option);
            
SendClientMessage(playerid, -1"Gate's autogate has been changed.");
        }else{
            return 
SendClientMessage(playerid, -1"You can't set autogate for a gate that have password.");
        }
    }
    if(!
strcmp(params"open"true4))
    {
        
SelectObject(playerid);
        
open[playerid] = true;
        
close[playerid] = false;
        
SendClientMessage(playerid, -1"You are changing open postion for gate.");
    }
    if(!
strcmp(params"close"true5))
    {
        
SelectObject(playerid);
        
open[playerid] = false;
        
close[playerid] = true;
        
SendClientMessage(playerid, -1"You are changing close postion for gate.");
    }
    return 
1;

Reply
#4

Is there a chance that you are using a filterscript that has the same cmds? If so, they might be conflicting with eachother. Also i assume they are both running another operating system?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)