is this possible
#1

is it possible to use isplayerinarea then if say im a robber and i enter that place with 4 stars it temporary sets my stars to 0 so police can';t arrest me then when i leave the area it puts my stars back to w/e they were?

btw how do i do /getall and everyone comes to me
Reply
#2

i cant help you with Playerarea but getall command i do.

try this
pawn Код:
if (strcmp("/getall", cmdtext, true, 14) == 0)
{
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid,X,Y,Z);
for(new i=0; i<MAX_PLAYERS; i++ )
{
SetPlayerPos(i,X+2,Y,Z);
}
return 1;
}
Reply
#3

DCMD FTW~

pawn Код:
OnPlayerCommandText(playerid, cmdtext[])
{
  dcmd(getall, 6, cmdtext);
  return 0;
}
pawn Код:
dcmd_getall(playerid, params[])
{
  #pragma unused params
  new Float:x, Float:y, Float:z;
  GetPlayerPos(playerid, x, y, z);
  for(new i = 0; i < MAX_PLAYERS i++) SetPlayerPos(i, x, y+2, z);
  return 1;
}
Reply
#4

yea dcmd is better
Reply
#5

dcmd betyter but more errors-.

C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSNR~1.PWN(4366) : error 001: expected token: ";", but found "-identifier-"
Reply
#6

Quote:
Originally Posted by Kar
dcmd betyter but more errors-.

C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSNR~1.PWN(4366) : error 001: expected token: ";", but found "-identifier-"
I like ZCMD. :3
Reply
#7

Quote:
Originally Posted by Sky4D
Quote:
Originally Posted by Kar
dcmd betyter but more errors-.

C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSNR~1.PWN(4366) : error 001: expected token: ";", but found "-identifier-"
I like ZCMD. :3
Well that was useless...


Can you show us the code that is on that line? Also DCMD works great if you know what your doing. Also pretty straight forward to setup.
Reply
#8

Код:
for(new i = 0; i < MAX_PLAYERS i++) SetPlayerPos(i, x, y+2, z);
Reply
#9

For the first one use IsPlayerInRangeOfPoint mixed with a timer, make a timer to check for everyone's position.

on OnGameModeInit()

pawn Код:
SetTimer("AreaTimer",5000,true);
pawn Код:
forward AreaTimer();
public AreaTimer()
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
      {
            if(IsPlayerInRangeOfPoint(i, RANGE,X,Y,Z) && IsPlayerARobber(i)) // change to whatever you have
            {
                SetPlayerWantedLevel(playerid, 4);
            }
            else
            {
        SetPlayerWantedLevel(playerid, 0);
            }
        }
    }
}
Reply
#10

so when they leave the area there wanted lvl gets set back to w/e it was?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)