small problem
#1

can someone help me with that ? , i made this gates and let them move automatically so.. here's the code

http://pastebin.com/KjJp22Hw
Reply
#2

and what's the problem now?
Reply
#3

Mhm... try that,

On top of your script:
pawn Код:
new PDGATE;
Under OnGameModeInit / OnFilterScriptInit:
pawn Код:
PDGATE = CreateStreamObject(980,1588.239868,-1638.272827,14.609522,0.000000,0.000000,180.260574,200.00);
Under OnPlayerCommandText:
pawn Код:
if(strcmp(cmd, "/openpd", true) == 0)
{
    if(PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 1)
    {
        MoveStreamObject(PDGATE,1598.102172,-1638.277832,14.609522,2.00);
        SendClientMessage(playerid,COLOR_GREEN, "You opening the PD gate.");
    }
    else SendClientMessage(playerid, COLOR_RED, "You are not a pd/fbi Member!");
    return 1;
}

if(strcmp(cmd, "/closepd", true) == 0)
{
    if(PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 1)
    {
        MoveStreamObject(PDGATE,1588.239868,-1638.272827,14.609522,2.00);
        SendClientMessage(playerid,COLOR_GREEN, "You closing the PD gate.");
    } else SendClientMessage(playerid, COLOR_RED, "You are not a pd/fbi Member!");
    return 1;
}
Reply
#4

when i complie the script , there goes some erros

Код HTML:
C:\DOCUME~1\English\Desktop\gf\GAMEMO~1\gfaaaaa.pwn(6755) : warning 215: expression has no effect
C:\DOCUME~1\English\Desktop\gf\GAMEMO~1\gfaaaaa.pwn(6755) : error 001: expected token: ";", but found "."
C:\DOCUME~1\English\Desktop\gf\GAMEMO~1\gfaaaaa.pwn(6755) : error 029: invalid expression, assumed zero
C:\DOCUME~1\English\Desktop\gf\GAMEMO~1\gfaaaaa.pwn(6755) : error 017: undefined symbol "CreateStreamObject"
C:\DOCUME~1\English\Desktop\gf\GAMEMO~1\gfaaaaa.pwn(6755) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Reply
#5

Give us your CreateStreamObject NATIVE, the problem is in that function.
If you don't have... just change to CreateObject or use another STREAMER.
Reply
#6

ok i made it like that , Instead of MoveStreamObject- Move Object and instead of CreateSteamObject- CreateObject
but there still some errors



Код HTML:
C:\DOCUME~1\Arabic\Desktop\gf\GAMEMO~1\gfaaaaa.pwn(6755) : warning 202: number of arguments does not match definition
C:\DOCUME~1\English\Desktop\gf\GAMEMO~1\gfaaaaa.pwn(8121) : warning 215: expression has no effect
C:\DOCUME~1\English\Desktop\gf\GAMEMO~1\gfaaaaa.pwn(8121) : error 001: expected token: ";", but found "."
C:\DOCUME~1\English\Desktop\gf\GAMEMO~1\gfaaaaa.pwn(8121) : error 029: invalid expression, assumed zero
C:\DOCUME~1\English\Desktop\gf\GAMEMO~1\gfaaaaa.pwn(8122) : warning 217: loose indentation
C:\DOCUME~1\English\Desktop\gf\GAMEMO~1\gfaaaaa.pwn(8122) : warning 215: expression has no effect
C:\DOCUME~1\English\Desktop\gf\GAMEMO~1\gfaaaaa.pwn(8122) : error 001: expected token: ";", but found "."
C:\DOCUME~1\English\Desktop\gf\GAMEMO~1\gfaaaaa.pwn(8122) : error 029: invalid expression, assumed zero
C:\DOCUME~1\English\Desktop\gf\GAMEMO~1\gfaaaaa.pwn(8122) : warning 215: expression has no effect
C:\DOCUME~1\English\Desktop\gf\GAMEMO~1\gfaaaaa.pwn(8122) : error 001: expected token: ";", but found "if"
C:\DOCUME~1\English\Desktop\gf\GAMEMO~1\gfaaaaa.pwn(8122) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


6 Errors.
Reply
#7

Give me the specific LINES, I can't know what's your problem like that...
Reply
#8

put this under your includes
pawn Код:
new PDGATE;
and you might want
pawn Код:
if(IsPlayerInRangeOfPoint(playerid, XYZ))
;
Reply
#9

thanks but can you put it , i don't know where? i mean IsPlayerInRangeOfPoint.
Reply
#10

pawn Код:
if( strcmp( cmd, "/openpd", true) == 0 )
{
    if( PlayerInfo[ playerid ][ pLeader ] != 2 || PlayerInfo[ playerid ][ pMember ] != 2 || PlayerInfo[ playerid ][ pLeader ] != 1 || PlayerInfo[ playerid ][ pMember ] != 1) return SendClientMessage( playerid, COLOR_GREEN, "gtfo" );
    if( !IsPlayerInRangeOfPoint( playerid, 10.0, 1588.239868, -1638.272827, 14.609522 ) ) return SendClientMessage( playerid, COLOR_GREEN, "gtfo" );
    MoveObject( PDGATE, 1598.102172, -1638.277832, 14.609522, 2 );
    SendClientMessage( playerid, COLOR_GREEN, "You opening the PD gate." );
    SetTimer( "PDGatesClose", 10000, false );
    return true;
}
forward PDGatesClose( ); public PDGatesClose( ) MoveObject( PDGATE, 1588.239868, -1638.272827, 14.609522 );
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)