03.05.2013, 10:40
No matter what command i use i only get "You are not a law member"
this is the commands i added before it started.
and
this is the commands i added before it started.
pawn Код:
if(strcmp(cmd, "/giveweaponlicense", true) || strcmp(cmd, "/giveweaplic", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(IsACop(playerid))
{
if(PlayerInfo[playerid][pRank] >= 5)
{
if(PlayerInfo[playerid][pDBanned] == 1)
{
SendClientMessage(playerid, COLOR_GREY, "You are Banned from Police Duty!");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /giveweaponlicense [playerid/PartOfName]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid !=INVALID_PLAYER_ID)
{
GetPlayerName(giveplayerid, sendername, sizeof(sendername));
if(PlayerInfo[giveplayerid][pGunLic] == 1) return SendClientMessage(playerid, COLOR_GREY, "This player already have a weapon license!");
PlayerInfo[giveplayerid][pGunLic] = 1;
format(string, sizeof(string),"You have given a weapon license to %s.",giveplayer);
SendClientMessage(playerid, COLOR_GREY, string);
format(string, sizeof(string),"%s Has given you a weapon license!",sendername);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
}
}
else
{
SendClientMessage(playerid, COLOR_GREY,"That player is offline");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY,"You must be rank 5+!");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY,"You are not a law member!");
return 1;
}
}
return 1;
}
pawn Код:
if(strcmp(cmd, "/giveofficerlicense", true) || strcmp(cmd, "/givecoplic", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(IsACop(playerid))
{
if(PlayerInfo[playerid][pRank] >= 4)
{
if(PlayerInfo[playerid][pDBanned] == 1)
{
SendClientMessage(playerid, COLOR_GREY, "You are Banned from Police Duty!");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /giveofficerlicense [playerid/PartOfName]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid !=INVALID_PLAYER_ID)
{
GetPlayerName(giveplayerid, sendername, sizeof(sendername));
if(PlayerInfo[giveplayerid][pCopLic] == 1) return SendClientMessage(playerid, COLOR_GREY, "This player already have officer license!");
PlayerInfo[giveplayerid][pCopLic] = 1;
format(string, sizeof(string),"You have given officer license to %s.",giveplayer);
SendClientMessage(playerid, COLOR_GREY, string);
format(string, sizeof(string),"%s Has given you officer license!",sendername);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
}
}
else
{
SendClientMessage(playerid, COLOR_GREY,"That player is offline");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY,"You must be rank 5+!");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY,"You are not a law member!");
return 1;
}
}
return 1;
}