Easy Script Fix Request
#3

Quote:

/ Torrans Roadblock System
// Made by Torran
// DO NOT REMOVE THESE CREDITS

#include <a_samp>
#include <zcmd>

#define FILTERSCRIPT
#if defined FILTERSCRIPT

#define VERSION "v1"

#define COLOR_RED 0xFF0000FF
#define COLOR_GREEN 0x00FF00FF

new RoadBlockDeployed[MAX_PLAYERS];
new PlayerRB[MAX_PLAYERS];

public OnFilterScriptInit()
{
print("\n |----------------------------------|");
printf(" | * Torran's Roadblock System %s * |", VERSION);
print(" |----------------------------------|\n");
return 1;
}

public OnFilterScriptExit()
{
return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
RoadBlockDeployed[playerid] = 0;
DestroyObject(PlayerRB[playerid]);
return 1;
}

#endif

CMD:roadblock(playerid, params[])
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_RED, "You need to be admin to use this command");

if(RoadBlockDeployed[playerid] == 0)
{
new Float, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
new Float:angle;
GetPlayerFacingAngle(playerid, angle);
RoadBlockDeployed[playerid] = 1;
SendClientMessage(playerid, COLOR_GREEN, "Roadblock deployed, Destroy it using - /destroyrb");
PlayerRB[playerid] = CreateObject(981, x, y, z, 0, 0, angle);
SetPlayerPos(playerid, x, y, z+1);
}
else
{
SendClientMessage(playerid, COLOR_RED, "You already have a deployed roadblock, Please destroy it - /destroyrb");
}
return 1;
}

CMD:destroyrb(playerid, params[])
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_RED, "You need to be admin to use this command");

if(RoadBlockDeployed[playerid] == 1)
{
RoadBlockDeployed[playerid] = 0;
SendClientMessage(playerid, COLOR_GREEN, "Roadblock destroyed");
DestroyObject(PlayerRB[playerid]);
}
else
{
SendClientMessage(playerid, COLOR_RED, "There isn't a valid roadblock to destroy");
}
return 1;
}

Its NOT created by me, but Please help and thanks!
Reply


Messages In This Thread
Easy Script Fix Request - by jakejohnsonusa - 29.09.2012, 21:33
Re: Easy Script Fix Request - by xMCx - 29.09.2012, 21:36
Re: Easy Script Fix Request - by jakejohnsonusa - 29.09.2012, 21:41
Re : Easy Script Fix Request - by Amine_Mejrhirrou - 29.09.2012, 21:57
Re: Re : Easy Script Fix Request - by jakejohnsonusa - 29.09.2012, 22:01
Re : Easy Script Fix Request - by Amine_Mejrhirrou - 29.09.2012, 22:04
Re: Easy Script Fix Request - by jakejohnsonusa - 29.09.2012, 22:13
Re : Easy Script Fix Request - by Amine_Mejrhirrou - 29.09.2012, 22:19
Re: Easy Script Fix Request - by jakejohnsonusa - 29.09.2012, 22:34
Re: Easy Script Fix Request - by jakejohnsonusa - 29.09.2012, 22:47

Forum Jump:


Users browsing this thread: 2 Guest(s)