is this possible - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: is this possible (
/showthread.php?tid=156084)
is this possible -
Kar - 20.06.2010
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
Re: is this possible -
titanak - 20.06.2010
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;
}
Re: is this possible -
Antonio [G-RP] - 20.06.2010
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;
}
Re: is this possible -
titanak - 21.06.2010
yea dcmd is better
Re: is this possible -
Kar - 21.06.2010
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-"
Re: is this possible -
(.Aztec); - 21.06.2010
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
Re: is this possible -
BP13 - 21.06.2010
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.
Re: is this possible -
Kar - 21.06.2010
Код:
for(new i = 0; i < MAX_PLAYERS i++) SetPlayerPos(i, x, y+2, z);
Re: is this possible -
CuervO - 21.06.2010
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);
}
}
}
}
Re: is this possible -
Kar - 21.06.2010
so when they leave the area there wanted lvl gets set back to w/e it was?