Scripting Problem, explanation requested.
#1

I'm trynna learn scripting, and I tried making a LSPD system, which is on proccess, I failed on making /duty work, and /lspdadminset so if you're admin, to set your team in LSPD.
Fix the code for me, and tell me what I did wrong, I know i've done many mistakes, I'm a beginer.
PHP код:
#include <a_samp>
#include <a_http>
#include <MidoStream>
#include <zcmd>
#include <GeoIP_Plugin>
#include <gtazones>
#include <streamer>
#define Group
#define team_lspd   1 // team to design lspd officers
#define team_civ    2// civ team
#define COLOR_YELLOW      0xFFFF00AA
public OnPlayerCommandText(playeridcmdtext[])
{
     if(!
strcmp(cmdtext"/duty"))
     
GetPlayerPos(playeridxyz);
     }
     if(
pTeam[playerid] == team_civ){ // Check if the player is a civilian
     
SendClientMessage(playeridCOLOR_YELLOW"You are not a LSPD officer");
        if new 
string1[] = (IsPlayerPosplayerid 0,1575.8651,-1690.4974,6.2188,359.9606,0,0,0,0,0,0)
        
SetPlayerSkin(playeid300)
        
SendClientMessage(playerid0xFFFFFFFF"You've gone on duty");
        if(!
strcmp(string1falseSendClientMessage "You must be at duty point!"))
        
        return 
1;
     }
     return 
0;
}
public 
OnPlayerCommandText(playeridcmdtext[])
{
     if(!
strcmp(cmdtext"/lspdadminset"))
     {
        if(!
IsPlayerConnected(i) || IsPlayerAdmin(i))continue;
        
SendClientMessage(playerid0xFFFFFFFF"You're LSPD now!");
        
pTeam[playerid] = team_lspd;
        return 
1;
     }
     return 
0;

REMINDER: I'm a newbie on scripting.
Reply


Messages In This Thread
Scripting Problem, explanation requested. - by DRP - 17.01.2016, 17:16
Re: Scripting Problem, explanation requested. - by PrO.GameR - 17.01.2016, 17:42
Re: Scripting Problem, explanation requested. - by DRP - 17.01.2016, 18:00
Re: Scripting Problem, explanation requested. - by -CaRRoT - 17.01.2016, 19:08
Re: Scripting Problem, explanation requested. - by DRP - 18.01.2016, 05:33

Forum Jump:


Users browsing this thread: 1 Guest(s)