SA-MP Forums Archive
Better idea than that difficult IsPlayerInArea - 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: Better idea than that difficult IsPlayerInArea (/showthread.php?tid=90897)



Better idea than that difficult IsPlayerInArea - speedruntrainer - 10.08.2009

Hey, can someone help me with removing those errors/warnings? I have a bad feeling I;m doint it wrong T.T
I have this code:
pawn Код:
public OnPlayerCommandText(playerid,cmdtext[])
{
  if(iamatdm == 0)
  {
  /jetpack, /healme;
  }
  else
  {
    SendClientMessage(playerid,0xFF0000FF,"You Cant Use Commands In Dm Area!!");
  }
  return 0;
}
And here are my errors:
Код:
C:\Users\Nel\Desktop\Mijn spullen\GTA Games\Server test gta\filterscripts\Test.pwn(41) : error 017: undefined symbol "iamatdm"
C:\Users\Nel\Desktop\Mijn spullen\GTA Games\Server test gta\filterscripts\Test.pwn(43) : error 029: invalid expression, assumed zero
C:\Users\Nel\Desktop\Mijn spullen\GTA Games\Server test gta\filterscripts\Test.pwn(43) : error 017: undefined symbol "jetpack"
C:\Users\Nel\Desktop\Mijn spullen\GTA Games\Server test gta\filterscripts\Test.pwn(43) : error 017: undefined symbol "healme"
C:\Users\Nel\Desktop\Mijn spullen\GTA Games\Server test gta\filterscripts\Test.pwn(43) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


5 Errors.
Just adding new didn't work. can someone help? Thanks.

EDIT: All the players that are in a DM area can't use these commands. (only outside)


Re: Need help for defining this :/ - Kyle - 10.08.2009

I just have to ROFL at this this is an EPIC FAIL

Use isplayerinarea



Quote:
On top
new iamatdm;
new jetpack;
new healme;

WHAT THE HELL USE THIS ITS THE SAME BUT I TOOK OUT /HEALME AND SUMET ELSE CAUS I DONT KNOW WHAT THE FUK IT WAS

Quote:

public OnPlayerCommandText(playerid,cmdtext[])
{
if(iamatdm == 0)
{

}
else
{
SendClientMessage(playerid,0xFF0000FF,"You Cant Use Commands In Dm Area!!");
}
return 0;
}



Learn how to code

Quote:
https://sampwiki.blast.hk/wiki/Creating_Commands



Re: Need help for defining this :/ - shady91 - 10.08.2009

errr thats the weirdest command ive ever seen made did you just try to make this up.?


Re: Need help for defining this :/ - saiberfun - 10.08.2009

wow what the fuck is that


https://sampwiki.blast.hk/wiki/Creating_Commands

^^


Re: Need help for defining this :/ - speedruntrainer - 10.08.2009

NO, I KNOW HOW TO MAKE A COMMAND. I have used the search function to disable commands INSIDE A DM AREA! I've pasted this code from a topic.


Re: Need help for defining this :/ - shady91 - 10.08.2009

Quote:
Originally Posted by saiberfun
lmao look like he just randomly thought adding stuff like that works see its the weirdest thing ive ever seen lmao.


Re: Need help for defining this :/ - shady91 - 10.08.2009

Quote:
Originally Posted by speedruntrainer
NO, I KNOW HOW TO MAKE A COMMAND. I have used the search function to disable commands INSIDE A DM AREA! I've pasted this code from a topic.
Well Its 100% Wrong i can tell just by looking at it you havent done nothing but copy and paste and hope read the wiki link.


https://sampwiki.blast.hk/wiki/Creating_Commands




Re: Need help for defining this :/ DISABLING CMDS IN DM ZONES - speedruntrainer - 10.08.2009

Lol I already know, But, I mean,
You can't use /healme and /jetpack at some dm zones I scripted, that's what I mean. I found this code under OnPlayerCommandText in this topic: http://forum.sa-mp.com/index.php?topic=98747.0


Re: Need help for defining this :/ DISABLING CMDS IN DM ZONES - NeRoSiS - 10.08.2009

At least's hes willing to learn, for fucks sake if you seen someone try to backflip or something and failing epicly you wouldnt stand there laughing at them telling them they've done it wrong.

This is the same thing on a smaller scale.

First thing mate, follow the tutorial to creating commands, then, once the commands are in do something like this.


Код:
public OnPlayerCommandText(playerid,cmdtext[])
{
  if(!IsPlayerInDMArea(playerid) )
  {
  // Insert your commands here.
  }
  else return SendClientMessage(blablabla your not in the zone);
  return 0;
}
Then do something like this.

Код:
forward IsPlayerInDMArea(playerid);
Public IsPlayerInDMArea(playerid)
{

IsPlayerInarea(blablabla);

}
Do some research in to the ideas I gave you, I need sleep.


Re: Need help for defining this :/ - speedruntrainer - 10.08.2009






Quote:
https://sampwiki.blast.hk/wiki/Creating_Commands
[/quote]

Yes, I will, but I know how to use commands. but I found this about disabling commands in a dm zone but IsPlayerInArea or so is fucking hard to use with min_z and y.
I found this code.
http://forum.sa-mp.com/index.php

Quote:
Originally Posted by saiberfun
I know how to do, I ment this http://forum.sa-mp.com/index.php

Quote:
Originally Posted by Shady91
Quote:
Originally Posted by speedruntrainer
NO, I KNOW HOW TO MAKE A COMMAND. I have used the search function to disable commands INSIDE A DM AREA! I've pasted this code from a topic.
Well Its 100% Wrong i can tell just by looking at it you havent done nothing but copy and paste and hope read the wiki link.


https://sampwiki.blast.hk/wiki/Creating_Commands

http://forum.sa-mp.com/index.php

RIGHT!!! :@