Need help on LARP Script (Car system,roadblock,gangs.)
#1

Hey, i have edited the LA-RP script, a bit.

and i need help, first with the /rb(roadblock), and /rrb(Rub road-block[deletes it.])

The /rb CM:
[pawno]
if(strcmp(cmdtext, "/roadblock", true)==0 || strcmp(cmdtext, "/rb", true)==0)
{
if (PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pLeader] == 3) return SendClientMessage(playerid, COLOR_GREY, "You are not in LAPD / F.B.I / Army!");
if (PlayerInfo[playerid][pRoadblock] != 0) return SendClientMessage(playerid, COLOR_GREY, "You can only deploy 1 roadblock at a time, type /rrb to remove your existing one.");
if (roadblocktimer != 0) return SendClientMessage(playerid, COLOR_GREY, "Please wait before trying to spawn another roadblock!");
new Float:X, Float:Y, Float:Z, Float:A;
GetPlayerPos(playerid, X, Y, Z);
GetPlayerFacingAngle(playerid, A);
PlayerInfo[playerid][pRoadblock] = CreateObject(981, X, Y, Z, 0.0, 0.0, A+180);
SetPlayerPos(playerid, X, Y, Z+4);
GameTextForPlayer(playerid, "~w~Roadblock ~r~Placed", 5000, 5);
SendClientMessage(playerid, COLOR_GREEN, "Roadblock deployed successfully, type /rrb or /roadunblock to remove it.");
roadblocktimer = 1;
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "HQ: A roadblock has been deployed by %s, it has been marked on the map by a checkpoint.", sendername);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pMember] == 1 || PlayerInfo[i][pLeader] == 1)
{
SetPlayerCheckpoint(playerid, X, Y, Z-10, 1.0);
SendClientMessage(i, TEAM_BLUE_COLOR, string);
if (PlayerInfo[i][pRank] >= 5 && PlayerInfo[i][pMember] || PlayerInfo[i][pLeader] == 1)
{
SendClientMessage(i, COLOR_YELLOW, "You can remove all roadblocks by typing /rrball");
}
}
}
}
SetTimer("ResetRoadblockTimer", 60000, false);
return 1;
}[/pawno]

when i get in-game, it just doesnt let me place one.

and the /rrb

[pawno]
if(strcmp(cmdtext, "/roadunblock", true)==0 || strcmp(cmdtext, "/rrb", true)==0)
{
if (PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pLeader] == 3)
{
SendClientMessage(playerid, COLOR_GREY, "You are not LAPD / F.B.I / Army !");
return 1;
}
if (PlayerInfo[playerid][pRank] < 5)
{
SendClientMessage(playerid, COLOR_GREY, "You have to be rank 5 to use this command!");
return 1;
}
if (PlayerInfo[playerid][pRoadblock] == 0)
{
SendClientMessage(playerid, COLOR_GREY, "You haven't deployed a roadblock!");
return 1;
}
RemoveRoadblock(playerid);
SendClientMessage(playerid, COLOR_GREEN, "Roadblock removed successfully.");
return 1;
}[/pawno]


Right, for the gangs.

i need a step-by-step tutorial on how to make gangs, (WITH CUSTOM SKIN CHOICES.)
i've been wondering how until i first ever started scripting , THIS IS MAJOR TO ME !

THANKYOU.

the error's with the roadblock's are, when i get in-game and type /rb, it say's im not a cop / fbi / national guard..
Reply
#2

1: Use 2: Are you setting yourself to the Cop/Soilder W.E Team?
3: Ask in the LA-RP thread.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)