A little attempt
#1

Well, I tried to make a /pduty command for officers..
Code:
if(strcmp(cmd, "/pduty", true) == 0)
{
if(PlayerToPoint(3, playerid,303.8969,-141.7608,1004.0625);
}
if(PlayerInfo[playerid][pSmember] != 11)
{
SendClientMessage(playerid, COLOR_GRAD1, "Police Officers only!");
return 1;
}
PlayerInfo[playerid][pTeam] = level;
SendTeamMessage(2, TEAM_BLUE_COLOR, "Officer %s has gone on duty", sendername);
return 1;
}
and Pawno Libary stops working.. and I dont know..? Any help?
Reply
#2

Code:
if(strcmp(cmd, "/pduty", true) == 0)
{
if(PlayerToPoint(3, playerid,303.8969,-141.7608,1004.0625);
 {
  if(PlayerInfo[playerid][pSmember] != 11) return SendClientMessage(playerid, COLOR_GRAD1, "Police Officers only!");
  PlayerInfo[playerid][pTeam] = level;
  SendTeamMessage(2, TEAM_BLUE_COLOR, "Officer %s has gone on duty", sendername);
  return 1;
 }
}
Reply
#3

Here you go..? Tho what does " PlayerInfo[playerid][pTeam] = level; " exactly do..set there team# to there lvl?
Shouldnt you make it set there duty status instead of there team?
pawn Code:
if(strcmp(cmd, "/pduty", true) == 0)
{
    if(PlayerToPoint(3, playerid,303.8969,-141.7608,1004.0625)
    {
        if(PlayerInfo[playerid][pSmember] != 11) return SendClientMessage(playerid, COLOR_GRAD1, "Police Officers only!");
        PlayerInfo[playerid][pTeam] = level;
        SendTeamMessage(2, TEAM_BLUE_COLOR, "Officer %s has gone on duty", sendername);
    }
    return 1;
}
Reply
#4

Quote:
Originally Posted by Seif_
Learn to indent your code and this will never happen.
Yea..that too, tho it might have been the code tags..and then again he had a semicolon on his p2p check..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)