SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Thread Tools Display Modes
Old 09/01/2010, 09:26 PM   #1
TheGtaLover
Big Clucker
 
Join Date: Dec 2008
Posts: 64
Reputation: 0
Default A little attempt

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?
TheGtaLover is offline  
Old 09/01/2010, 09:34 PM   #2
CJ101
High-roller
 
CJ101's Avatar
 
Join Date: Jan 2008
Location: RevolutionX
Posts: 1,758
Reputation: 162
Default Re: A little attempt

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;
 }
}
__________________
I have left SA-MP. Thanks for a great ten years.
CJ101 is offline  
Old 09/01/2010, 09:38 PM   #3
s0nic
Big Clucker
 
s0nic's Avatar
 
Join Date: Apr 2008
Location: Lennox, CA
Posts: 166
Reputation: 5
Default Re: A little attempt

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;
}
__________________
s0nic is offline  
Old 09/01/2010, 09:52 PM   #4
s0nic
Big Clucker
 
s0nic's Avatar
 
Join Date: Apr 2008
Location: Lennox, CA
Posts: 166
Reputation: 5
Default Re: A little attempt

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..
__________________
s0nic is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Float help (First attempt) -Rebel Son- Help Archive 8 27/04/2010 04:49 PM
[help] BAD RCON ATTEMPT BlueRey Server Support 4 14/02/2010 01:01 PM
[UNSOLVED] Automatic Login attempt. `FuTuRe- Help Archive 6 15/01/2010 07:17 AM
help with a command 1st attempt madmatty Help Archive 14 28/06/2009 10:09 PM


All times are GMT. The time now is 01:00 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.