Script errors + lines.
#3

Quote:

if(strcmp(cmd, "/invite", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /invite [playerid/PartOfName]");
return 1;
}
new ftext[20];
giveplayerid = ReturnUser(tmp);
if(PlayerInfo[playerid][pLeader] >= 1)
{
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if(PlayerInfo[giveplayerid][pMember] == 0 && PlayerInfo[giveplayerid][pLeader] == 0 && PlayerInfo[giveplayerid][pFMember] == 255)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
if(PlayerInfo[playerid][pLeader] == 1) {ftext = "Los Santos Police Department";}
else if(PlayerInfo[playerid][pLeader] == 2) {ftext = "Federal Bureau of Investigation";}
else if(PlayerInfo[playerid][pLeader] == 3) {ftext = "Department of Corrections";}
else if(PlayerInfo[playerid][pLeader] == 4) {ftext = "Los Santos Emergency Medical Services";}
else if(PlayerInfo[playerid][pLeader] == 5) {ftext = "U.S. Navy Seals";}
else if(PlayerInfo[playerid][pLeader] == 6) {ftext = "The Government";}
else if(PlayerInfo[playerid][pLeader] == 7) {ftext = "Secret Service";}
else if(PlayerInfo[playerid][pLeader] == {ftext = "Hitman Agency";}
else if(PlayerInfo[playerid][pLeader] == 9) {ftext = "San Andreas News Network";}
else if(PlayerInfo[playerid][pLeader] == 10) {ftext = "Taxi Cab Company";}
format(string, sizeof(string), "You have invited %s to join %s.", giveplayer, ftext);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "%s has invited you to join %s. Type /accept faction to accept the invitation.",sendername, ftext);
SendClientMessage(giveplayerid, COLOR_YELLOW, string);
FactionOffer[giveplayerid] = playerid;
}
else
{
SendClientMessage(playerid, COLOR_GREY, "The subjected player is already a member of an official faction.");
return 1;
}
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " You are not authorized to use that command (leaders only) !");
}
}
return 1;
}

^^That's the entire command. I don't really know where to place what you said, since it doesn't really fit in with the command itself. - I know this sounds nooby, but I'm fairly new to scripting, kind of.
Reply


Messages In This Thread
Script errors + lines. - by City of Santos: Roleplay - 11.07.2011, 18:15
Re: Script errors + lines. - by WoodPecker - 11.07.2011, 18:48
Re: Script errors + lines. - by City of Santos: Roleplay - 11.07.2011, 19:05
Re: Script errors + lines. - by Shadoww5 - 11.07.2011, 19:05
Re: Script errors + lines. - by Toreno - 11.07.2011, 19:07
Re: Script errors + lines. - by City of Santos: Roleplay - 11.07.2011, 19:15
Re: Script errors + lines. - by WoodPecker - 11.07.2011, 19:20
Re: Script errors + lines. - by City of Santos: Roleplay - 11.07.2011, 19:41
Re: Script errors + lines. - by Shadoww5 - 11.07.2011, 21:17

Forum Jump:


Users browsing this thread: 1 Guest(s)