What's wrong ???
#1

Код:
new const fRanks[][] =
{
    { "", "", "", "", "", "", "" }, // Civilian
	{ "", "Cadet", "Officer", "Sergeant", "Lieutenant", "Captain", "Chief" }, // Police Departament
	{ "", "Professional Staff", "Special Agent", "Special Agent in Charge", "Assistant of Director", "Vice-Director", "Director" }, // Federal Bureau Of Investigation
	{ "", "Private", "Sergeant", "Major", "Captain", "Lieutenant", "General" }, // National Guard
	{ "", "Assistant", "Assistant In Charge", "Medic", "Paramedic", "Special Medic", "Chief Medic" }, // Medics/Fireman Departament
	{ "", "Intern", "Local Reporter", "Network Editor", "Network Anchor", "Journalist", "Network Producer" }, // News Reporters
	{ "", "Trainee", "Taxi Rookie", "Cabbie", "Despatcher", "Shift Supervisor", "Taxi Company Owner" }, // Taxi Cab Company
	{ "", "OutSider", "Soulja", "Gangsta", "Original Gangsta", "Double OG", "Grove King" }, // Grove Street Family
	{ "", "OutSider", "YoungBlood", "Gangsta", "Original Gangsta", "Double OG", "Balla' GodFather" }, // Ballas Gang
	{ "", "Cabron", "Vago", "Soldado", "Mafioso", "Derecha Mano", "Senior" }, // Los Santos Vagos
	{ "", "Cabron", "Vago", "Soldado", "Mafioso", "Derecha Mano", "Senior" }, // Varrios Los Aztecas
	{ "", "Soldado", "Caporale", "Sergente", "Luogotenente", "Colonnello", "Padrino" }, // La Cosa Nostra
	{ "", "Recuit", "Corporal", "Colonel", "Brigadier", "General", "WarLord" }, // Yakuza
	{ "", "Junior", "Drifter", "Legal Racer", "Event Maker", "Ilegal Racer", "Most Wanted" }, // For More Adrenaline
	{ "", "Lancer", "Marksman", "Agent", "Special Agent", "Vice-Director", "Director" } // Hitman Agency
};
What's wrong there .. When i set that in 1 message shown just "der" or "er" or that kind of texts...

Код:
new String[128];
format(String, sizeof(String), "Your rank it's %s !", fRanks[7][6]);
SendClientMessage(playerid, -1, String);
That's just an exemple ... But if i put that anywhere the text will appear "Your rank it's der !" or something like this ..
Reply
#2

try increasing the size of string.

your rank show in numbers or the name.?
Reply
#3

Do it like this:

PHP код:
#define GetRank(%0,%1) fRanks[(%0)-1][(%1)-1]
stock const fRanks[][][] =
{
    { 
"Cadet", "Officer", "Sergeant", "Lieutenant", "Captain", "Chief" }, // Police Departament
    
{ "Professional Staff", "Special Agent", "Special Agent in Charge", "Assistant of Director", "Vice-Director", "Director" }, // Federal Bureau Of Investigation
    
{ "Private", "Sergeant", "Major", "Captain", "Lieutenant", "General" }, // National Guard
    
{ "Assistant", "Assistant In Charge", "Medic", "Paramedic", "Special Medic", "Chief Medic" }, // Medics/Fireman Departament
    
{ "Intern", "Local Reporter", "Network Editor", "Network Anchor", "Journalist", "Network Producer" }, // News Reporters
    
{ "Trainee", "Taxi Rookie", "Cabbie", "Despatcher", "Shift Supervisor", "Taxi Company Owner" }, // Taxi Cab Company
    
{ "OutSider", "Soulja", "Gangsta", "Original Gangsta", "Double OG", "Grove King" }, // Grove Street Family
    
{ "OutSider", "YoungBlood", "Gangsta", "Original Gangsta", "Double OG", "Balla' GodFather" }, // Ballas Gang
    
{ "Cabron", "Vago", "Soldado", "Mafioso", "Derecha Mano", "Senior" }, // Los Santos Vagos
    
{ "Cabron", "Vago", "Soldado", "Mafioso", "Derecha Mano", "Senior" }, // Varrios Los Aztecas
    
{ "Soldado", "Caporale", "Sergente", "Luogotenente", "Colonnello", "Padrino" }, // La Cosa Nostra
    
{ "Recuit", "Corporal", "Colonel", "Brigadier", "General", "WarLord" }, // Yakuza
    
{ "Junior", "Drifter", "Legal Racer", "Event Maker", "Ilegal Racer", "Most Wanted" }, // For More Adrenaline
    
{ "Lancer", "Marksman", "Agent", "Special Agent", "Vice-Director", "Director" } // Hitman Agency
};
//Usage:
new String[128];
format(String, sizeof(String), "Your rank it's %s !", GetRank(7,6));
SendClientMessage(playerid, -1, String); 
Reply
#4

Quote:
Originally Posted by SpikY_
Посмотреть сообщение
try increasing the size of string.

your rank show in numbers or the name.?
When i use pInfo[playerid][pRank] it's show my rank correctly , but that string don't work ... And to put if(Faction == X & rank == X) .. it will take me a lot of space and time .. I need that fixed ..
Reply
#5

Okay...ignore my correct answer
Reply
#6

Quote:
Originally Posted by Kaliber
Посмотреть сообщение
Do it like this:

PHP код:
#define GetRank(%0,%1) fRanks[(%0)-1][(%1)-1]
stock const fRanks[][][] =
{
    { 
"Cadet", "Officer", "Sergeant", "Lieutenant", "Captain", "Chief" }, // Police Departament
    
{ "Professional Staff", "Special Agent", "Special Agent in Charge", "Assistant of Director", "Vice-Director", "Director" }, // Federal Bureau Of Investigation
    
{ "Private", "Sergeant", "Major", "Captain", "Lieutenant", "General" }, // National Guard
    
{ "Assistant", "Assistant In Charge", "Medic", "Paramedic", "Special Medic", "Chief Medic" }, // Medics/Fireman Departament
    
{ "Intern", "Local Reporter", "Network Editor", "Network Anchor", "Journalist", "Network Producer" }, // News Reporters
    
{ "Trainee", "Taxi Rookie", "Cabbie", "Despatcher", "Shift Supervisor", "Taxi Company Owner" }, // Taxi Cab Company
    
{ "OutSider", "Soulja", "Gangsta", "Original Gangsta", "Double OG", "Grove King" }, // Grove Street Family
    
{ "OutSider", "YoungBlood", "Gangsta", "Original Gangsta", "Double OG", "Balla' GodFather" }, // Ballas Gang
    
{ "Cabron", "Vago", "Soldado", "Mafioso", "Derecha Mano", "Senior" }, // Los Santos Vagos
    
{ "Cabron", "Vago", "Soldado", "Mafioso", "Derecha Mano", "Senior" }, // Varrios Los Aztecas
    
{ "Soldado", "Caporale", "Sergente", "Luogotenente", "Colonnello", "Padrino" }, // La Cosa Nostra
    
{ "Recuit", "Corporal", "Colonel", "Brigadier", "General", "WarLord" }, // Yakuza
    
{ "Junior", "Drifter", "Legal Racer", "Event Maker", "Ilegal Racer", "Most Wanted" }, // For More Adrenaline
    
{ "Lancer", "Marksman", "Agent", "Special Agent", "Vice-Director", "Director" } // Hitman Agency
};
//Usage:
new String[128];
format(String, sizeof(String), "Your rank it's %s !", GetRank(7,6));
SendClientMessage(playerid, -1, String); 
You must spend some repotation blabla bla .. Thx you ... I can't give you rep

Quote:
Originally Posted by Kaliber
Посмотреть сообщение
Okay...ignore my correct answer
Didn't see you post
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)