22.07.2013, 09:37
I have problem with script. When i type command /glocker . I have in range of point locker but system not work with locker id 1 < and PlayerInfo[playerid][pMember] not work. I have placed code only for pMember == i but player in faction can't use it, and if PlayerInfo[playerid][pMember] = 0 it work. Civilian can use /glocker and Member in faction can't use /glocker. Here me code
I used MySQL to load it. Dynamic3Dtext create on Position i placed Float: g_fLockerPos[3]
g_fLockerPosX = 266.33
g_fLockerPosY = 110.18
g_fLockerPosZ = 1004.61
Please help me
Код:
#define MAX_GROUPS 20
enum eGroupData {
Float: g_fLockerPos[3],
}
CMD:glocker(playerid, params[]) {
new
szTitle[64 + GROUP_MAX_NAME_LEN],
iGroupID = PlayerInfo[playerid][pMember];
if(0 <= iGroupID < MAX_GROUPS) for(new i = 0; i != MAX_GROUPS; ++i) if(IsPlayerInRangeOfPoint(playerid, 10.0, arrGroupData[i][g_fLockerPos][0], arrGroupData[i][g_fLockerPos][1], arrGroupData[i][g_fLockerPos][2])) {
if(i == iGroupID) {
format(szTitle, sizeof szTitle, "Locker {%6x}(%s)", arrGroupData[iGroupID][g_hDutyColour], arrGroupData[iGroupID][g_szGroupName]);
ShowPlayerDialog(playerid, DIALOG_GROUP_SLOCKER, DIALOG_STYLE_LIST, szTitle, "Duty\nWeapon\nSWAT\nUniform\nUndercover\nClear Suspect", "Select", "Cancel");
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GREY, "You are not in Faction.");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "You not near any locker.");
return 1;
}
return 1;
}
g_fLockerPosX = 266.33
g_fLockerPosY = 110.18
g_fLockerPosZ = 1004.61
Please help me

