Regarding...
#1

Ok, I want to make a command where a player has to be near the coords but they have to be an officer..
what is the if thing again?

if(!isPlayerCop or something, sadly it is not in the script I am using
Reply
#2

You aren't even showing any script you're using... What is your job array?
Reply
#3

Im using VX-RP 2.
Reply
#4

Quote:
Originally Posted by Jordiee
Посмотреть сообщение
Im using VX-RP 2.
Uhm yeah, right. That would be? Vortex Roleplay? Please just give the job array
Reply
#5

Like Jochemd saied, we need the array or we cant help.
Reply
#6

What do you mean the array, im new to coding >.<
Reply
#7

vxrp2 relies on group types for groups, especially for the LSPD, as it is a group, not a job.

pawn Код:
if(groupVariables[playerVariables[playerid][pGroup]][gGroupType] == 1 && playerVariables[playerid][pGroup] != 0) {
Take a look at the code above, that's from the /lspd command. It should be common sense to look for functions that use similar code, you'll be able to understand from it and try make what you're trying to do.

You'll also notice code below in the /lspd command code:

pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 5, 264.1055,109.8094,1004.6172) && GetPlayerInterior(playerid) == 10) {
The code, combined, checks if the player is in the LSPD and if they're at certain coordinates and in the correct interior.
Reply
#8

Ok I will try and make a command for this, and if I get errors I will post here.
Reply
#9

These are the errors:
Код:
C:\Users\Jordan\Desktop\Windows\gamemodes\vx-rp.pwn(14871) : error 036: empty statement
C:\Users\Jordan\Desktop\Windows\gamemodes\vx-rp.pwn(14872) : error 001: expected token: ")", but found ";"
C:\Users\Jordan\Desktop\Windows\gamemodes\vx-rp.pwn(14872) : error 036: empty statement
C:\Users\Jordan\Desktop\Windows\gamemodes\vx-rp.pwn(14874) : error 017: undefined symbol "Else"
C:\Users\Jordan\Desktop\Windows\gamemodes\vx-rp.pwn(14877) : error 010: invalid function or declaration
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


5 Errors.
And this is the command:
Код:
CMD:garage(playerid, params[]) {
	if(groupVariables[playerVariables[playerid][pGroup]][gGroupType] == 1);
 	if(IsPlayerInRangeOfPoint(playerid, 5, -2286.9431,2284.1853,4.9731);
	SetPlayerPos(playerid, 1588.7703,-1640.3796,13.1978);
	Else {
	SendClientMessage(playerid, COLOR_RED, "You are not in the PD, Therefore cannot enter the garage.");
	}
	return 1;
}
Reply
#10

Bump.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)