Raised This Month: $32 Target: $400
 8% 

Funnyrank plugin for SourceMOD!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
MPC
Junior Member
Join Date: Apr 2010
Old 02-07-2011 , 09:13   Funnyrank plugin for SourceMOD!
Reply With Quote #1

Hey guys!

I would like a funny rank plugin for source mod, so when someone writes:

Rank/rank/RANK then something like this comes up:

Your rank is a potato
Your rank is not here at the moment, please come back later

I want the ranks to be RANDOM, and I would like everybody can see the rank the person gets.

I would also want this so its easy to change. Like a plugin part (smx) and a config part where I can write my own suggestions!

I had one like it before on EVENTSCRIPTS, but it does not work anymore:

(Check attachements for that script)

I hope someone can help me with this!
Attached Files
File Type: txt funnyrank.txt (2.2 KB, 157 views)
MPC is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 02-10-2011 , 19:48   Re: Funnyrank plugin for SourceMOD!
Reply With Quote #2

PHP Code:
#pragma semicolon 1
#include <sourcemod>

#define VERSION "0.1"

static const String:ranks[4][] = 
{
    
'a loser',
    
'irrelevant! You could never understand how i feel *fixes quiff*',
    
'herpsyphogonahlitissalmahalatosisaids - C.'.
    
'Fart Enthusiast.',
    
'Jimbob.',
    
'Tila Tequila.',
    
'Mark Sanford.',
    
'Hung like a horse.',
    
'melted chicken shit.',
    
'Nick Nolte.',
    
'Misfortunate Placenta.',
    
'Kosay\'s Cave Club member.',
    
'Cockzilla.',
    
'Butthorn.',
    
'A Mullet.',
    
'Southern Fried Chicken.',
    
'The mechanisation of Soviet agriculture.',
    
'UFO! dum dum dum dumdumdum! dee daa dee daa deedeedaa! WOOOOOOoooOOOOOOO! WOOOoo oo oo OOOOOOooooOOOOOoooo!.',
    
'David\'s stepladder.',
    
'Kiss my snatch!',
    
'Roger Moore gave me gonorrhea.',
    
'-CLASSIFIED-',
    
'Zionist reptile menace.',
    
'CHEWBACCA [CENSORED] YOU UP.',
    
'HAN SOLO EAT A PINEAPPLE.',
    
'A Snape/Harry fanfiction.',
    
'A bundle of small twigs.',
    
'Oppressor of the proletariat.',
    
'A funky bass solo.',
    
'WHAT\'S GOING ON?!',
    
'Spiderdad.',
    
'Robert Smith\'s hair.',
    
'god',
    
'A "Greek Philosopher" *WINK*',
    
'The innocent love between a young boy and an older man.',
    
'Mcnuggets.',
    
'all over my fayayayayaaaaace!',
    
'a hot potato',
    
'Macs: miss a turn',
    
'a deep fried pizza',
    
'a traffic bollard',
    
'jupas [CENSORED]',
    
'a hot beef',
    
'a small bowl of clam chowder',
    
'THE WHITE STRIPES GAYEST FAN',
    
'albino TV news reporter',
    
'Joe Scarboroughs dead intern',
    
'a broken lamp',
    
'a few feet of timber',
    
'a Labour MP',
    
'a half empty can of fosters',
    
'distinctly under 9000',
    
'SNAAAAAAAAAAKE!!!!',
    
'LIQUUUUUUUUUID!!!!',
    
'Lasagna Bandit.',
    
'Cheesewheel.',
    
'Jackx\'s latest rape victim.',
    
'My desk feels all tilted, does your desk feel tilted? I need to know if it\'s just me.',
    
'NARLY!',
    
'RAD!',
    
'The fierce last stand of all i am.',
    
'The first martini of the day.',
    
'Input detected! Opening time portal! Time coordinates not detected; default destination: 1984!!!!',
    
'Tribal physics (E=MC SPEARED)',
    
'Unruly boy.',
    
'TUBULAR!',
    
'Hot [CENSORED]!',
    
'Smokey.',
    
'The Bandit.',
    
'Tony Danza wont like you using his hottub like that.',
    
'not avalible right now please try again on 11.06.2192'
}


public 
Plugin:myinfo = {
    
name "Fake Rank",
    
author "Mitchell",
    
description "Fakes the ranking system.",
    
version VERSION,
    
url "http://www.google.com/"
};

public 
OnPluginStart()
{
    
CreateConVar("fakerank_version"VERSIONNAMEFCVAR_PLUGIN|FCVAR_DONTRECORD|FCVAR_SPONLY|FCVAR_NOTIFY);
    
RegConsoleCmd("say"Command_Say);
}

public 
Action:Command_Say(clientargs){

    
decl String:text[192], String:command[64];

    new 
startidx 0;

    
GetCmdArgString(textsizeof(text));

    if (
text[strlen(text)-1] == '"')
    {        
        
text[strlen(text)-1] = '\0';
        
startidx 1;    
    }     
    if (
strcmp(command"say2"false) == 0)

    
startidx += 4;

    if (
strcmp(text[startidx], "/rank"false) == 0)    {
        
PrintToChat(client"Rank is \x04%s\x01!"ranks[GetRandomInt(069)]);
    }
    if (
strcmp(text[startidx], "rank"false) == 0)    {
        
PrintToChat(client"Rank is \x04%s\x01!"ranks[GetRandomInt(069)]);
    }
    return 
Plugin_Continue;
}

public 
Action:removeFlood(Handle:timerany:client){
    
userFlood[client]=0;

Not sure if it works, if it does PM me!
Mitchell is offline
MPC
Junior Member
Join Date: Apr 2010
Old 02-12-2011 , 11:53   Re: Funnyrank plugin for SourceMOD!
Reply With Quote #3

Where do I save the file?

and is it a .php or .smx? Since I am a noob
MPC is offline
FaTony
Veteran Member
Join Date: Aug 2008
Old 02-15-2011 , 12:12   Re: Funnyrank plugin for SourceMOD!
Reply With Quote #4

Create a .sp file and feed to spcomp.exe.
__________________
FaTony is offline
MPC
Junior Member
Join Date: Apr 2010
Old 02-16-2011 , 19:14   Re: Funnyrank plugin for SourceMOD!
Reply With Quote #5

Your plugin failed to compile! Read the errors below:

218810 successful compiles to date.
150673 failed compiles to date.

I got that on the online compiler at sourcemod.net

It did not list any errors, but it says it has.
MPC is offline
MPC
Junior Member
Join Date: Apr 2010
Old 02-24-2011 , 23:52   Re: Funnyrank plugin for SourceMOD!
Reply With Quote #6

Is the online compiler not working? Or is it something wrong in the script which gives me this error?
MPC is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 02-25-2011 , 02:30   Re: Funnyrank plugin for SourceMOD!
Reply With Quote #7

Try this
PHP Code:
#include <sourcemod>

#define VERSION "0.1"
#define NAME "Fake Rank"


static const String:ranks[71][110] = {
    
"a loser",
    
"irrelevant! You could never understand how i feel *fixes quiff*",
    
"herpsyphogonahlitissalmahalatosisaids - C.",
    
"Fart Enthusiast.",
    
"Jimbob.",
    
"Tila Tequila.",
    
"Mark Sanford.",
    
"Hung like a horse.",
    
"melted chicken shit.",
    
"Nick Nolte.",
    
"Misfortunate Placenta.",
    
"Kosay\'s Cave Club member.",
    
"Cockzilla.",
    
"Butthorn.",
    
"A Mullet.",
    
"Southern Fried Chicken.",
    
"The mechanisation of Soviet agriculture.",
    
"UFO! dum dum dum dumdumdum! dee daa dee daa deedeedaa! WOOOOOOoooOOOOOOO! WOOOoo oo oo OOOOOOooooOOOOOoooo!",
    
"David\'s stepladder.",
    
"Kiss my snatch!",
    
"Roger Moore gave me gonorrhea.",
    
"-CLASSIFIED-",
    
"Zionist reptile menace.",
    
"CHEWBACCA [CENSORED] YOU UP.",
    
"HAN SOLO EAT A PINEAPPLE.",
    
"A Snape/Harry fanfiction.",
    
"A bundle of small twigs.",
    
"Oppressor of the proletariat.",
    
"A funky bass solo.",
    
"WHAT\'s GOING ON?!",
    
"Spiderdad.",
    
"Robert Smith\'s hair.",
    
"god",
    
"A \"Greek Philosopher\" *WINK*",
    
"The innocent love between a young boy and an older man.",
    
"Mcnuggets.",
    
"all over my fayayayayaaaaace!",
    
"a hot potato",
    
"Macs: miss a turn",
    
"a deep fried pizza",
    
"a traffic bollard",
    
"jupas [CENSORED]",
    
"a hot beef",
    
"a small bowl of clam chowder",
    
"THE WHITE STRIPES GAYEST FAN",
    
"albino TV news reporter",
    
"Joe Scarboroughs dead intern",
    
"a broken lamp",
    
"a few feet of timber",
    
"a Labour MP",
    
"a half empty can of fosters",
    
"distinctly under 9000",
    
"SNAAAAAAAAAAKE!!!!",
    
"LIQUUUUUUUUUID!!!!",
    
"Lasagna Bandit.",
    
"Cheesewheel.",
    
"Jackx\'s latest rape victim.",
    
"My desk feels all tilted, does your desk feel tilted? I need to know if it\'s just me.",
    
"NARLY!",
    
"RAD!",
    
"The fierce last stand of all i am.",
    
"The first martini of the day.",
    
"Input detected! Opening time portal! Time coordinates not detected; default destination: 1984!!!!",
    
"Tribal physics (E=MC SPEARED)",
    
"Unruly boy.",
    
"TUBULAR!",
    
"Hot [CENSORED]!",
    
"Smokey.",
    
"The Bandit.",
    
"Tony Danza wont like you using his hottub like that.",
    
"not avalible right now please try again on 11.06.2192"
}

public 
Plugin:myinfo = {
    
name NAME,
    
author "Mitchell",
    
description "Fakes the ranking system.",
    
version VERSION,
    
url "http://www.google.com/"
}

public 
OnPluginStart()
{
    
CreateConVar("fakerank_version"VERSIONNAMEFCVAR_PLUGIN|FCVAR_DONTRECORD|FCVAR_SPONLY|FCVAR_NOTIFY);
    
RegConsoleCmd("say"Command_Say);
    
RegConsoleCmd("say_team"Command_Say);
}

public 
Action:Command_Say(clientargs){

    
decl String:text[192], String:command[64];

    new 
startidx 0;

    
GetCmdArgString(textsizeof(text));

    if (
text[strlen(text)-1] == '"')
    {        
        
text[strlen(text)-1] = '\0';
        
startidx 1;    
    }     

    if (
strcmp(command"say2"false) == 0)
    {
        
startidx += 4;
    }

    if (
strcmp(text[startidx], "/rank"false) == 0)
    {
        
PrintToChat(client"\x01Rank is \x04%s"ranks[GetRandomInt(069)]);
    }

    if (
strcmp(text[startidx], "rank"false) == 0)
    {
        
PrintToChat(client"\x01Rank is \x04%s"ranks[GetRandomInt(069)]);
    }
    return 
Plugin_Continue;

__________________
Do not Private Message @me
Bacardi is offline
MPC
Junior Member
Join Date: Apr 2010
Old 02-25-2011 , 09:08   Re: Funnyrank plugin for SourceMOD!
Reply With Quote #8

Thx! It worked!
MPC is offline
MPC
Junior Member
Join Date: Apr 2010
Old 02-26-2011 , 04:17   Re: Funnyrank plugin for SourceMOD!
Reply With Quote #9

I tried adding some more ranks, but it will not compile. It says 1 error.

/groups/sourcemod/upload_tmp/textDEIxsz.sp(26) : error 018: initialization data exceeds declared size

Code:
#include <sourcemod>

#define VERSION "0.1"
#define NAME "Fake Rank"


static const String:ranks[71][110] = {
    "a loser",
    "classified by the CIA.",
    "secretly Vladimir Putin.",
    "Co-Prince of Andorra.",
    "Prime Minister of Italy.",
    "climbin in yo windows- snatchin yo people up",
    "President of the United States.",
    "squill-head",
    "terrible at the game- but can suck cock like a pro!",
    "grand worldwide yiffing champion for the third year in a row",
    "acrid Meso-American bullshit",
    "irrelevant, there is only Zuul",
    "out of the closet",
    "about as reliable as a Ferguson rifle",
    "a great, soft, sissy, girlie, nancy, French, bender, Man United supporting poof!",
    "a nice cup of tea.",
    "perfectly cromulent",
    "not high enough to be allowed out of the gimp suit yet",
    "an overweight, over-the-hill, nicotine-stained, borderline alcoholic homophobe with a superiority complex and an unhealthy obsession with male bonding",
    "a cad and a bounder.",
    "sees dead people.",
    "the possessor of an arsehole like a clown\'s pocket.",
    "a very loose vagina.",
    "too damn high!.",
    "pretty terrible.",
    "excluding fees, tarriffs, and charges.",
    "Michael Jackson.",
    "Arse Licker By Appointment to His Majesty King George III.",
    "like- totally the best player ever.",
    "awesome sauce.",
    "00 Agent.",
    "Bond. James Bond.",
    "only $999.99!",
    "Mayor of London",
    "Viscount and Baron of the Nile and of Burnham Thorpe in the County of Norfolk; Baron of the Nile and of Hilborough in the said County; Knight of the Most Honourable Order of the Bath; Vice Admiral of the White Squadron of the Fleet; Commander in Chief of his Majesty\'s Ships and Vessels in the Mediterranean; Duke of Bronte in Sicily; Knight Grand Cross of the Sicilian Order of St Ferdinand and of Merit; Member of the Ottoman Order of the Crescent; Knight Grand Commander of the Order of St. Joachim; Colonel of the Royal Marines; Freeman of Bath; Salisbury; Exeter; Plymouth; Monmouth; Sandwich; Oxford; Hereford; and Worcester; Oxford University Doctor of Civil Law",
    "Douke Noulkemn.",
    "irrelevant! You could never understand how i feel *fixes quiff*",
    "herpsyphogonahlitissalmahalatosisaids - C.",
    "An accomplished pianist *begins scanning the room* Ladies? *creepy smile*.",
    "A slutty woman who is clearly asking for it.",
    "Fifty-One out of Sixty-Eight.",
    "One sexy snowman!",
    "A Sandwich.",
    "Fart Enthusiast.",
    "Jimbob.",
    "Tila Tequila.",
    "Mark Sanford.",
    "Hung like a horse.",
    "melted chicken shit.",
    "Nick Nolte.",
    "Misfortunate Placenta.",
    "Kosay\'s Cave Club member.",
    "Cockzilla.",
    "Butthorn.",
    "A Mullet.",
    "Southern Fried Chicken.",
    "The mechanisation of Soviet agriculture.",
    "UFO! dum dum dum dumdumdum! dee daa dee daa deedeedaa! WOOOOOOoooOOOOOOO! WOOOoo oo oo OOOOOOooooOOOOOoooo!",
    "David\'s stepladder.",
    "Kiss my snatch!",
    "Roger Moore gave me gonorrhea.",
    "-CLASSIFIED-",
    "Zionist reptile menace.",
    "CHEWBACCA [CENSORED] YOU UP.",
    "HAN SOLO EAT A PINEAPPLE.",
    "A Snape/Harry fanfiction.",
    "A bundle of small twigs.",
    "Oppressor of the proletariat.",
    "A funky bass solo.",
    "WHAT\'S GOING ON?!",
    "Spiderdad.",
    "Robert Smith\'s hair.",
    "god",
    "A -Greek Philosopher- *WINK*",
    "The innocent love between a young boy and an older man.",
    "Mcnuggets.",
    "all over my fayayayayaaaaace!",
    "a hot potato",
    "Macs: miss a turn",
    "a deep fried pizza",
    "a traffic bollard",
    "jupas [CENSORED]",
    "a hot beef",
    "a small bowl of clam chowder",
    "THE WHITE STRIPES GAYEST FAN",
    "albino TV news reporter",
    "Joe Scarboroughs dead intern",
    "a broken lamp",
    "a few feet of timber",
    "a Labour MP",
    "a half empty can of fosters",
    "distinctly under 9000",
    "SNAAAAAAAAAAKE!!!!",
    "LIQUUUUUUUUUID!!!!",
    "Lasagna Bandit.",
    "Cheesewheel.",
    "Tony Danza wont like you using his hottub like that.",
    "Jackx\'s latest rape victim.",
    "My desk feels all tilted, does your desk feel tilted? I need to know if it\'s just me.",
    "NARLY!",
    "RAD!",
    "The fierce last stand of all i am.",
    "The first martini of the day.",
    "Input detected! Opening time portal! Time coordinates not detected; default destination: 1984!!!!",
    "Tribal physics (E=MC SPEARED)",
    "Unruly boy.",
    "TUBULAR!",
    "Hot [CENSORED]!",
    "Smokey.",
    "The Bandit.",
    "not avalible right now please try again on 11.06.2192"
}

public Plugin:myinfo = {
    name = NAME,
    author = "Mitchell",
    description = "Fakes the ranking system.",
    version = VERSION,
    url = "http://www.google.com/"
}

public OnPluginStart()
{
    CreateConVar("fakerank_version", VERSION, NAME, FCVAR_PLUGIN|FCVAR_DONTRECORD|FCVAR_SPONLY|FCVAR_NOTIFY);
    RegConsoleCmd("say", Command_Say);
    RegConsoleCmd("say_team", Command_Say);
}

public Action:Command_Say(client, args){

    decl String:text[192], String:command[64];

    new startidx = 0;

    GetCmdArgString(text, sizeof(text));

    if (text[strlen(text)-1] == '"')
    {        
        text[strlen(text)-1] = '\0';
        startidx = 1;    
    }     

    if (strcmp(command, "say2", false) == 0)
    {
        startidx += 4;
    }

    if (strcmp(text[startidx], "/rank", false) == 0)
    {
        PrintToChat(client, "\x01Rank is \x04%s", ranks[GetRandomInt(0, 69)]);
    }

    if (strcmp(text[startidx], "rank", false) == 0)
    {
        PrintToChat(client, "\x01Rank is \x04%s", ranks[GetRandomInt(0, 69)]);
    }
    return Plugin_Continue;
}

Last edited by MPC; 02-26-2011 at 04:38.
MPC is offline
Adjo
Member
Join Date: Dec 2009
Location: UK
Old 02-26-2011 , 08:57   Re: Funnyrank plugin for SourceMOD!
Reply With Quote #10

This'll work:
PHP Code:
#include <sourcemod>

#define VERSION "0.1"
#define NAME "Fake Rank"


static const String:ranks[111][670] = {
    
"a loser",
    
"classified by the CIA.",
    
"secretly Vladimir Putin.",
    
"Co-Prince of Andorra.",
    
"Prime Minister of Italy.",
    
"climbin in yo windows- snatchin yo people up",
    
"President of the United States.",
    
"squill-head",
    
"terrible at the game- but can suck cock like a pro!",
    
"grand worldwide yiffing champion for the third year in a row",
    
"acrid Meso-American bullshit",
    
"irrelevant, there is only Zuul",
    
"out of the closet",
    
"about as reliable as a Ferguson rifle",
    
"a great, soft, sissy, girlie, nancy, French, bender, Man United supporting poof!",
    
"a nice cup of tea.",
    
"perfectly cromulent",
    
"not high enough to be allowed out of the gimp suit yet",
    
"an overweight, over-the-hill, nicotine-stained, borderline alcoholic homophobe with a superiority complex and an unhealthy obsession with male bonding",
    
"a cad and a bounder.",
    
"sees dead people.",
    
"the possessor of an arsehole like a clown\'s pocket.",
    
"a very loose vagina.",
    
"too damn high!.",
    
"pretty terrible.",
    
"excluding fees, tarriffs, and charges.",
    
"Michael Jackson.",
    
"Arse Licker By Appointment to His Majesty King George III.",
    
"like- totally the best player ever.",
    
"awesome sauce.",
    
"00 Agent.",
    
"Bond. James Bond.",
    
"only $999.99!",
    
"Mayor of London",
    
"Viscount and Baron of the Nile and of Burnham Thorpe in the County of Norfolk; Baron of the Nile and of Hilborough in the said County; Knight of the Most Honourable Order of the Bath; Vice Admiral of the White Squadron of the Fleet; Commander in Chief of his Majesty\'s Ships and Vessels in the Mediterranean; Duke of Bronte in Sicily; Knight Grand Cross of the Sicilian Order of St Ferdinand and of Merit; Member of the Ottoman Order of the Crescent; Knight Grand Commander of the Order of St. Joachim; Colonel of the Royal Marines; Freeman of Bath; Salisbury; Exeter; Plymouth; Monmouth; Sandwich; Oxford; Hereford; and Worcester; Oxford University Doctor of Civil Law",
    
"Douke Noulkemn.",
    
"irrelevant! You could never understand how i feel *fixes quiff*",
    
"herpsyphogonahlitissalmahalatosisaids - C.",
    
"An accomplished pianist *begins scanning the room* Ladies? *creepy smile*.",
    
"A slutty woman who is clearly asking for it.",
    
"Fifty-One out of Sixty-Eight.",
    
"One sexy snowman!",
    
"A Sandwich.",
    
"Fart Enthusiast.",
    
"Jimbob.",
    
"Tila Tequila.",
    
"Mark Sanford.",
    
"Hung like a horse.",
    
"melted chicken shit.",
    
"Nick Nolte.",
    
"Misfortunate Placenta.",
    
"Kosay\'s Cave Club member.",
    
"Cockzilla.",
    
"Butthorn.",
    
"A Mullet.",
    
"Southern Fried Chicken.",
    
"The mechanisation of Soviet agriculture.",
    
"UFO! dum dum dum dumdumdum! dee daa dee daa deedeedaa! WOOOOOOoooOOOOOOO! WOOOoo oo oo OOOOOOooooOOOOOoooo!",
    
"David\'s stepladder.",
    
"Kiss my snatch!",
    
"Roger Moore gave me gonorrhea.",
    
"-CLASSIFIED-",
    
"Zionist reptile menace.",
    
"CHEWBACCA [CENSORED] YOU UP.",
    
"HAN SOLO EAT A PINEAPPLE.",
    
"A Snape/Harry fanfiction.",
    
"A bundle of small twigs.",
    
"Oppressor of the proletariat.",
    
"A funky bass solo.",
    
"WHAT\'S GOING ON?!",
    
"Spiderdad.",
    
"Robert Smith\'s hair.",
    
"god",
    
"A -Greek Philosopher- *WINK*",
    
"The innocent love between a young boy and an older man.",
    
"Mcnuggets.",
    
"all over my fayayayayaaaaace!",
    
"a hot potato",
    
"Macs: miss a turn",
    
"a deep fried pizza",
    
"a traffic bollard",
    
"jupas [CENSORED]",
    
"a hot beef",
    
"a small bowl of clam chowder",
    
"THE WHITE STRIPES GAYEST FAN",
    
"albino TV news reporter",
    
"Joe Scarboroughs dead intern",
    
"a broken lamp",
    
"a few feet of timber",
    
"a Labour MP",
    
"a half empty can of fosters",
    
"distinctly under 9000",
    
"SNAAAAAAAAAAKE!!!!",
    
"LIQUUUUUUUUUID!!!!",
    
"Lasagna Bandit.",
    
"Cheesewheel.",
    
"Tony Danza wont like you using his hottub like that.",
    
"Jackx\'s latest rape victim.",
    
"My desk feels all tilted, does your desk feel tilted? I need to know if it\'s just me.",
    
"NARLY!",
    
"RAD!",
    
"The fierce last stand of all i am.",
    
"The first martini of the day.",
    
"Input detected! Opening time portal! Time coordinates not detected; default destination: 1984!!!!",
    
"Tribal physics (E=MC SPEARED)",
    
"Unruly boy.",
    
"TUBULAR!",
    
"Hot [CENSORED]!",
    
"Smokey.",
    
"The Bandit.",
    
"not avalible right now please try again on 11.06.2192"
}

public 
Plugin:myinfo = {
    
name NAME,
    
author "Mitchell",
    
description "Fakes the ranking system.",
    
version VERSION,
    
url "http://www.google.com/"
}

public 
OnPluginStart()
{
    
CreateConVar("fakerank_version"VERSIONNAMEFCVAR_PLUGIN|FCVAR_DONTRECORD|FCVAR_SPONLY|FCVAR_NOTIFY);
    
RegConsoleCmd("say"Command_Say);
    
RegConsoleCmd("say_team"Command_Say);
}

public 
Action:Command_Say(clientargs){

    
decl String:text[192], String:command[64];

    new 
startidx 0;

    
GetCmdArgString(textsizeof(text));

    if (
text[strlen(text)-1] == '"')
    {        
        
text[strlen(text)-1] = '\0';
        
startidx 1;    
    }     

    if (
strcmp(command"say2"false) == 0)
    {
        
startidx += 4;
    }

    if (
strcmp(text[startidx], "/rank"false) == 0)
    {
        
PrintToChat(client"\x01Rank is \x04%s"ranks[GetRandomInt(069)]);
    }

    if (
strcmp(text[startidx], "rank"false) == 0)
    {
        
PrintToChat(client"\x01Rank is \x04%s"ranks[GetRandomInt(069)]);
    }
    return 
Plugin_Continue;

The problem was:
PHP Code:
static const String:ranks[71][110
needs to be set at higher values, the first one ([71]) is how many strings there is, and the second one ([110]) is the max length of each string.

So it becomes:
PHP Code:
static const String:ranks[111][670
Also I think that:
Quote:
Viscount and Baron of the Nile and of Burnham Thorpe in the County of Norfolk; Baron of the Nile and of Hilborough in the said County; Knight of the Most Honourable Order of the Bath; Vice Admiral of the White Squadron of the Fleet; Commander in Chief of his Majesty\'s Ships and Vessels in the Mediterranean; Duke of Bronte in Sicily; Knight Grand Cross of the Sicilian Order of St Ferdinand and of Merit; Member of the Ottoman Order of the Crescent; Knight Grand Commander of the Order of St. Joachim; Colonel of the Royal Marines; Freeman of Bath; Salisbury; Exeter; Plymouth; Monmouth; Sandwich; Oxford; Hereford; and Worcester; Oxford University Doctor of Civil Law
is too much to be displayed in the chat box, however I may be wrong about that...
Adjo is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 21:35.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode