Roadblock System - 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)
+--- Thread: Roadblock System (
/showthread.php?tid=402192)
Roadblock System -
fury14 - 25.12.2012
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;
}
Re: Roadblock System -
PDChaseOfficial - 25.12.2012
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.");
}
Re: Roadblock System -
fury14 - 25.12.2012
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.
Re: Roadblock System -
jNkk - 25.12.2012
Try
pawn Код:
new Float:x, Float:y, Float:z ;
Re: Roadblock System -
Typhome - 25.12.2012
You have make system that saves (all) roadblock's data, then you can do that.
Re: Roadblock System -
fury14 - 25.12.2012
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?
Re: Roadblock System -
fury14 - 25.12.2012
can somebody help me?