Roadblock System
#1

Hi, i am editing a roadblock system... As you see on the video i placed a roadblock... And when i am far from roadblock a command for remove it, and it says that it's removed but roadblock is still there... I want this: when i type /removeroadblock but i am far from it, then it says to me "You are far from it!", and when i am close to roadblock and type /removeroadblock, then roadblock removes and it says to me "Roadblock removed"

here is the video...
http://www.youtube.com/watch?v=2ES0X...ature=*********

and here is command /maknizapreku which means /removeroadblock

Код:
if (strcmp(cmdtext, "/maknizapreku",true) == 0)
	{
	    if(PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pMember] == 3 || IsPlayerAdmin(playerid))
		{
     	    if(PlayerInfo[playerid][pRank] >= 2)
     	    {
	     	    new string[256];
	     	    new sendername[MAX_PLAYER_NAME];
	     	    putauzeto --;
		    GetPlayerName(playerid, sendername, sizeof(sendername));
	        	DeleteClosestRoadblock(playerid);
		        GameTextForPlayer(playerid,"~w~Zapreka ~r~uklonjena!",3000,1); // this means ROADBLOCK REMOVED
			    format(string, sizeof(string), "* %s je uklonio zapreku.", sendername);
				ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
			}
			else return SendClientMessage(playerid, COLOR_RED,"(Greska!) {C4C4C4}Morate biti rank 2+.");
		}
		else return SendClientMessage(playerid, COLOR_RED,"(Greska!) {C4C4C4}Niste clan drzavnih organizacije niti admin.");
	    return 1;
	}
Reply
#2

try using
Код:
if(IsPlayerInRangeOfPoint(playerid,30,x,y,z))
{
    // remove roadblock
}
else
{
    SendClientMessage(playerid,COLOR_RED,"You are too far from roadblock to remove it.");
}
Reply
#3

1 error:

Код:
C:\Users\WaLLa\Desktop\Toxic Gaming v1.0.0\gamemodes\CLRP.pwn(36000) : error 017: undefined symbol "x"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#4

Try

pawn Код:
new Float:x, Float:y, Float:z ;
Reply
#5

You have make system that saves (all) roadblock's data, then you can do that.
Reply
#6

Quote:
Originally Posted by jNkk
Посмотреть сообщение
Try

pawn Код:
new Float:x, Float:y, Float:z ;
It solved the error, but now i can't destroy roadblock at all :S

@Typhome

How can I do that? Would you help me?
Reply
#7

can somebody help me?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)