if(!strcmp("/poffduty",cmdtext))
{
new gTeam[MAX_PLAYERS];
if(gTeam[playerid] == 1)
{
if(IsPlayerInRangeOfPoint(playerid, 7.0, 2295.9094,2451.3831,10.8203))
{
SendClientMessage(playerid,0xFFFFFFFF,"You changed to the civilian skin, and also you will be able to drive your job's car.");
SetPlayerSkin(playerid, 185);
}
else
SendClientMessage(playerid,0xFFFFFFFF,"You have to go to LVPD spawn place, to use this command");
}
else
SendClientMessage(playerid,0xFFFFFFFF, " You need to be cop in order to use this command. ");
}
return 1;
}

if(!strcmp("/poffduty",cmdtext))
{
new gTeam[MAX_PLAYERS]; // YOU CREATED THE VAR
if(gTeam[playerid] == 1) // you checked it, but you didn't used it in anywhere, so how could it be 1?
{
if(IsPlayerInRangeOfPoint(playerid, 7.0, 2295.9094,2451.3831,10.8203))
{
SendClientMessage(playerid,0xFFFFFFFF,"You changed to the civilian skin, and also you will be able to drive your job's car.");
SetPlayerSkin(playerid, 185);
}
else
SendClientMessage(playerid,0xFFFFFFFF,"You have to go to LVPD spawn place, to use this command");
}
else
SendClientMessage(playerid,0xFFFFFFFF, " You need to be cop in order to use this command. ");
}
return 1;
}
#define TEAM_LVPD #define TEAM_EMS #define TEAM_FBI #define TEAM_Military #define TEAM_DRIVER #define TEAM_NEW
SetPlayerTeamFromClass(playerid, classid)
new gTeam[MAX_PLAYERS];
if (classid == 0)
{
gTeam[playerid] = 1;
}
if (classid == 1)
{
gTeam[playerid] = 2;
}
if (classid == 2)
{
gTeam[playerid] = 3 ;
}
if (classid == 3)
{
gTeam[playerid] = 4;
}
if (classid == 4)
{
gTeam[playerid] = 5;
}
if (classid == 5)
{
gTeam[playerid] = 6;
}
new gTeam[MAX_PLAYERS];
#define TEAM_LVPD
#define TEAM_EMS
#define TEAM_FBI
#define TEAM_Military
#define TEAM_DRIVER
#define TEAM_NEW
new gTeam[MAX_PLAYERS];
|
Originally Posted by MadeMan
pawn Код:
pawn Код:
|