Код:
if(strcmp(cmd, "/duty", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pFaction] != 255 && DynamicFactions[PlayerInfo[playerid][pFaction]][fType] == 1)
{
if (PlayerToPoint(5.0, playerid,PoliceDutyPosition[X],PoliceDutyPosition[Y],PoliceDutyPosition[Z]))
{
if(GetPlayerVirtualWorld(playerid) == PoliceDutyPosition[World])
{
if(CopOnDuty[playerid] == 0)
{
if(PlayerInfo[playerid][pSex] == 1)
{
PlayerActionMessage(playerid,15.0,"{DDA0DD}%s tira a sua roupa de civil, veste a sua farda preparando-se para mais um dia б defesa do vale.");
}
else
{
PlayerActionMessage(playerid,15.0,"{DDA0DD}%s tira a sua roupa de civil, veste a sua farda preparando-se para mais um dia б defesa do vale.");
}
GivePlayerWeapon(playerid, 24, 70);
GivePlayerWeapon(playerid, 3, 0);
GivePlayerWeapon(playerid, 43, 700);
CopOnDuty[playerid] = 1;
SetPlayerToFactionSkin(playerid);
SetPlayerToFactionColor(playerid);
format(string, sizeof(string), "[PSP:] %s estб agora de serviзo",GetPlayerNameEx(playerid));
SendFactionTypeMessage(1, COLOR_LSPD, string);
return 1;
}
else
{
if(PlayerInfo[playerid][pSex] == 1)
{
PlayerActionMessage(playerid,15.0,"{DDA0DD} Tira a sua farda, veste a sua roupa civil preparando-se para voltar б sua vida normal.");
}
else
{
PlayerActionMessage(playerid,15.0,"{DDA0DD} Tira a sua farda, veste a sua roupa civil preparando-se para voltar б sua vida normal.");
}
ResetPlayerWeapons(playerid);
CopOnDuty[playerid] = 0;
SetPlayerToFactionSkin(playerid);
SetPlayerToFactionColor(playerid);
return 1;
}
}
}
else
{
SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "{8B0000}[ERRO:] Nгo estбs no local de duty!");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "{8B0000}[ERRO:] Faction/Type Invбlida.");
return 1;
}
}
return 1;
}
Deve ser isso que tб pedindo.
Alguem dб ai uma ajuda? Dou REP+.. !!