17.01.2016, 17:16
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.
REMINDER: I'm a newbie on scripting.
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(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/duty"))
GetPlayerPos(playerid, x, y, z);
}
if(pTeam[playerid] == team_civ){ // Check if the player is a civilian
SendClientMessage(playerid, COLOR_YELLOW, "You are not a LSPD officer");
if new string1[] = (IsPlayerPos, playerid 0,1575.8651,-1690.4974,6.2188,359.9606,0,0,0,0,0,0)
SetPlayerSkin(playeid, 300)
SendClientMessage(playerid, 0xFFFFFFFF, "You've gone on duty");
if(!strcmp(string1, false, SendClientMessage "You must be at duty point!"))
return 1;
}
return 0;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/lspdadminset"))
{
if(!IsPlayerConnected(i) || IsPlayerAdmin(i))continue;
SendClientMessage(playerid, 0xFFFFFFFF, "You're LSPD now!");
pTeam[playerid] = team_lspd;
return 1;
}
return 0;
}