Regarding... -
Jordiee - 22.11.2011
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
Re: Regarding... -
Jochemd - 22.11.2011
You aren't even showing any script you're using... What is your job array?
Re: Regarding... -
Jordiee - 22.11.2011
Im using VX-RP 2.
Re: Regarding... -
Jochemd - 22.11.2011
Quote:
Originally Posted by Jordiee
Im using VX-RP 2.
|
Uhm yeah, right. That would be? Vortex Roleplay? Please just give the job array
Re: Regarding... - Max_Coldheart - 22.11.2011
Like Jochemd saied, we need the array or we cant help.
Re: Regarding... -
Jordiee - 22.11.2011
What do you mean the array, im new to coding >.<
Re: Regarding... -
Calgon - 22.11.2011
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.
Re: Regarding... -
Jordiee - 22.11.2011
Ok I will try and make a command for this, and if I get errors I will post here.
Re: Regarding... -
Jordiee - 22.11.2011
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;
}
Re: Regarding... -
Jordiee - 22.11.2011
Bump.