Faction ID problem
#3

Quote:
Originally Posted by Jefff
Посмотреть сообщение
pawn Код:
FactionInfo[GetPlayerFactionID(playerid)][FactionID]
xd
Doesnt help mate

I tried using this too
PHP код:
GetPlayerFactionID(playerid) return FactionInfo[AccInfo[playerid][PlayerFaction]][FactionID]; 
But with that it displays faction ID: 3 and faction type 0 ...

PHP код:
public OnFactionLoad() {
    new 
rowsfields;
    
cache_get_data(rowsfieldsmysql);
    if(
rows) {
        for(new 
0rows && MAX_FACTIONSi++) {
            new 
string[512];
            
            
cache_get_field_content(i"Name"string);
            
strreplace(string'_'' ');
            
format(FactionInfo[i][FactionName], sizeof(string), string);
            
FactionInfo[i][FactionID] = cache_get_field_content_int(i,"ID");
            
FactionInfo[i][FactionEnterX] = cache_get_field_content_float(i,"EnterX");
            
FactionInfo[i][FactionEnterY] = cache_get_field_content_float(i,"EnterY");
            
FactionInfo[i][FactionEnterZ] = cache_get_field_content_float(i,"EnterZ");
            
FactionInfo[i][FactionExitX] = cache_get_field_content_float(i,"ExitX");
            
FactionInfo[i][FactionExitY] = cache_get_field_content_float(i,"ExitY");
            
FactionInfo[i][FactionExitZ] = cache_get_field_content_float(i,"ExitZ");
            
FactionInfo[i][FactionWorld] = cache_get_field_content_int(i,"World");
            
FactionInfo[i][FactionInterior] = cache_get_field_content_int(i,"Interior");
            
FactionInfo[i][FactionBank] = cache_get_field_content_int(i,"FactionBank");
            
FactionInfo[i][FactionDeagleAmmo] = cache_get_field_content_int(i,"DeagleAmmo");
            
FactionInfo[i][FactionM4Ammo] = cache_get_field_content_int(i,"M4Ammo");
            
FactionInfo[i][FactionShotgunAmmo] = cache_get_field_content_int(i,"ShotgunAmmo");
            
FactionInfo[i][FactionSniperAmmo] = cache_get_field_content_int(i,"SniperAmmo");
            
FactionInfo[i][FactionSmuggledCocaine] = cache_get_field_content_int(i,"CocaineSmuggledWhen");
            
FactionInfo[i][FactionType] = cache_get_field_content_int(i,"Type");
            
FactionInfo[i][FactionCocaineAmount] = cache_get_field_content_int(i,"CocaAmount");
            
FactionInfo[i][FactionPickup] = CreateDynamicPickup(12751cache_get_field_content_float(i,"EnterX"),cache_get_field_content_float(i,"EnterY"),cache_get_field_content_float(i,"EnterZ"));
            
format(string,sizeof(string),"Faction Name: %s\nFaction ID:%i",FactionInfo[i][FactionName],FactionInfo[i][FactionID]);
            
FactionInfo[i][FactionText] = CreateDynamic3DTextLabel(string0x008080FFFactionInfo[i][FactionEnterX],FactionInfo[i][FactionEnterY],FactionInfo[i][FactionEnterZ], 5.0INVALID_PLAYER_IDINVALID_VEHICLE_ID0);
            
printf("Faction ID: %i || Faction Type: %i",FactionInfo[i][FactionID],FactionInfo[i][FactionType]);
        }
    }
    return 
true;

Reply


Messages In This Thread
Faction ID problem - by TwinkiDaBoss - 05.01.2016, 17:40
Re: Faction ID problem - by Jefff - 05.01.2016, 17:46
Re: Faction ID problem - by TwinkiDaBoss - 05.01.2016, 17:53
Re: Faction ID problem - by justinnater - 05.01.2016, 18:16
Re: Faction ID problem - by TwinkiDaBoss - 05.01.2016, 18:37
Re: Faction ID problem - by justinnater - 05.01.2016, 18:44
Re: Faction ID problem - by TwinkiDaBoss - 05.01.2016, 20:08
Re: Faction ID problem - by justinnater - 05.01.2016, 20:16
Re: Faction ID problem - by TwinkiDaBoss - 05.01.2016, 20:20
Re: Faction ID problem - by justinnater - 05.01.2016, 20:25

Forum Jump:


Users browsing this thread: 1 Guest(s)