Moving object script need help....
#1

This is the second script i Made today

the thing is script is loading in server log

but cant see the map . and when i type cmd i.e /opencb

its saying unknown cmd. and i dont see that map in server

here is the scripts

PHP код:
#include <a_samp>
#if defined FILTERSCRIPT
#define 0xB4B5B7FF
new CargoBay;
public 
OnFilterScriptInit()
{
            
CargoBay CreateObject(3113646.099975585943168.39990234381.049999952316300100);
            return 
1;
}
if (
strcmp("/opencb"cmdtexttrue,))
            {
            
MoveObject(CargoBay,646.53166.199951171991);//This will move the gate
            
SendClientMessage(playerid0xB4B5B7FF"CargoBay is opening");
            }
            return 
1;
        }
if (
strcmp("/closecb"cmdtexttrue,))
            {
            
MoveObject(CargoBay,646.099975585943168.39990234381.04999995231631);//This will move the gate back to the old position
            
SendClientMessage(playerid0xB4B5B7FF"CargoBay is Closing");
            }
            return 
1;
}
#endif 
this is the second script

PHP код:
#include <a_samp>
#if defined FILTERSCRIPT
#define 0xB4B5B7FF
new CarrierLift;
public 
OnFilterScriptInit()
{
            
CarrierLift CreateObject(3115,644.59997559,3177.30004883,16.98640060,0.00000000,0.00000000,280.00000000);
            return 
1;
}
public 
OnPlayerCommandText(playeridcmdtext[])
{
        if (
strcmp("/opencl"cmdtexttrue10))
            {
            
MoveObject(CarrierLift644.59960938,3177.29980469,9.850000381);//This will move the gate
            
SendClientMessage(playerid0xB4B5B7FF"Lift is going up");
            }
            return 
1;
        }
        if (
strcmp("/closecl"cmdtexttrue,))
            {
            
MoveObject(CarrierLift646.50000000,3166.19995117,9.000000001);//This will move the gate back to the old position
            
SendClientMessage(playerid0xB4B5B7FF"Lift is Going Down");
            }
            return 
1;
        }
return 
0;
}
#endif 
can someone helpme out and tell what is wrong with it ? and why itsnot loading ?



pls..
Reply
#2

i see a mistake in ur command

it is

if (strcmp("/opencl", cmdtext, true, 10))


but should be

if(strcmp(cmd, "/opencl", true) == 0)
Reply
#3

pawn Код:
if (strcmp("/closecl", cmdtext, true) == 1)
Reply
#4

Thanks for the help. its working fine now...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)