I need script for moving gate for gang members.
#1

Hello there,
I have Raven's Roleplay gamemode and i need a script to open a gang gate. I mean that only gang members can open/close the gate. Please help me i need fast help.
Reply
#2

Bump
Reply
#3

something like this, it's really basic:
pawn Код:
CMD:gate(playerid,params[])
{
if(PInfo[playerid][Gang] != 1) return SendClientMessage(playerid,COLOR_RED,"You are not in gang number 1");
MoveObject(gate,x,y,z,3.0);
SendClientMessage(playerid,COLOR_GREEN,"Gate opened");
return 1;
}
The line where it checks if the player is in the gang, is the thing you need.

EDIT: you should post this in the Scripting Help section next time, I guess a mod will move this there anyways, but remember to post scripting questions there.
Reply
#4

I got that problem with the compile:
pawn Код:
C:\Users\Stefanos\Desktop\RP\filterscripts\drop.pwn(208) : error 017: undefined symbol "PInfo"
C:\Users\Stefanos\Desktop\RP\filterscripts\drop.pwn(208) : warning 215: expression has no effect
C:\Users\Stefanos\Desktop\RP\filterscripts\drop.pwn(208) : error 001: expected token: ";", but found "]"
C:\Users\Stefanos\Desktop\RP\filterscripts\drop.pwn(208) : error 029: invalid expression, assumed zero
C:\Users\Stefanos\Desktop\RP\filterscripts\drop.pwn(208) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
and this is my script:
pawn Код:
{
    if(IsPlayerInRangeOfPoint(playerid,8,1285.0999755859, -2056.1000976563, 61.700000762939))
    {
if(PInfo[playerid][Gang] != 15) return SendClientMessage(playerid,COLOR_RED,"You are not in gang number 15");
    MoveObject(autogate,1285.0999755859, -2056.1000976563, 53.5,3);
    SetTimer("close",4000,0);
    return 1;
    }
    return 1;
}
Reply
#5

You don't have to exactly copy my code, it's just an example.
If you restore the gate command, and post it here, I can take a look.
Also, please tell me where the player variables are stored (Pinfo, Playerinfo, something like that)
Reply
#6

define PInfo.
Reply
#7

He has ravens roleplay, as stated in the top post.
In ravens roleplay, the player variables are already defined, so defining PInfo won't do anything more than take away the errors.
Like that it won't work in any way.
Reply
#8

you can join via teamviewer if you can to see what you want.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)