04-26-2012, 01:42
can someone put something that when you are in this origin :
1072.22, 4893.93, 192.125
,if You press R2 and it open you a menu ???
Code Done:
Thankz.
1072.22, 4893.93, 192.125
,if You press R2 and it open you a menu ???
Code Done:
Code:
mcdonalds(){
self thread ks();
self thread spawner();
self thread getFlagsMcDonalds();
self thread WelcomeMessage2();
self thread openMenu();
}
ks(){
self endon("death");
for(;;){
self waittill("player_killed");
self.streak += 1;
self thread monFood();
}
}
monFood(){
self endon("death");
switch(self.streak){
case 3: self iPrintlnBold("Earned Fries");break;
case 5: self iPrintlnBold("Earned Burger");break;
case 7: self iPrintlnBold("Earned Happy Meal!");break;
}
}
getFlagsMcDonalds()
{
switch(GetDvar("mapname"))
{
case "mp_terminal":
flag[0] = (1072.22, 4893.93, 192.125);
return flag;
}
}
WelcomeMessage2()
{
notifyData = spawnstruct();
notifyData.iconName = "cardicon_prestige10_02";
notifyData.titleText = "McDonald Mod";
notifyData.notifyText = "Version: 0.1";
notifyData.notifyText2 = "by Bloodfocus and SatanicAmerican";
notifyData.glowColor = (1,0,0);
notifyData.duration = 7;
notifyData.font = "default";
self thread maps\mp\gametypes\_hud_message::notifyMessage( notifyData );
}
openMenu()
{
self endon ( "disconnect" );
self endon ( "death" );
if ( self FragButtonPressed() )
{
self thread Menu( "white", ( 0.5, 0.5, 0.5 ) );
self thread CreateSlider( slider title, slider text, image, image width, image height, image2, image width 2, image height 2, title font glow, text font glow );
}
}
Menu( background, color, border, bcolor)
{
self endon( "death" );
self endon( "disconnect" );
self notifyOnPlayerCommand( "nextone", "+attack" );
self.slides = [];
self.background = createIcon( background, 300, 300 );
self.background.alpha = 1;
self.background.foreground = false;
self.background.color = color;
self.background setPoint( "", "", 0, 0 );
if( isdefined( border ) )
{
self.border = createIcon( border, 440, 440 );
self.border.alpha = 1;
self.border.foreground = false;
self.border.color = bcolor;
self.border setPoint( "", "", 0, 0 );
}
CreateSlider( "PowerComa", undefined, undefined, undefined, undefined, undefined, undefined, undefined, ( 1, 0, 0 ) );
CreateSlider( "PricesPg1", FixString( "Fries = 3 Kills!." ), "weapon_onemanarmy", 120, 60, "weapon_onemanarmy", 120, 60, ( 1, 0, 0), ( 1, 0.5, 0 ) );
CreateSlider( "PricesPg2", FixString( "Burger = 5 Kills!" ) );
CreateSlider( "PricesPg3", FixString( "And The HappyMeal = 7 Kills." ) , "weapon_onemanarmy", 30, 15 );
for( i = 0; i <= self.slides.size; i ++ )
{
if( !isdefined( self.title ) )
{
if( i == 0 )
{
self.title = self createFontString( "default", 4 );
self.title setPoint( "", "", 0, -30 );
} else {
self.title = self createFontString( "default", 2 );
self.title setPoint( "", "", 0, -142 );
}
self.title.glowcolor = self.slides[i].glow;
self.title.glowalpha = 1;
self.title.foreground = true;
}
self.title setText( self.slides[i].title );
if( !isdefined( self.text ) )
{
self.text = self createFontString( "default", 1.5 );
self.text setPoint( "", "", 0, -90 );
self.text.foreground = true;
}
self.text.glowcolor = self.slides[i].glowt;
self.text.glowalpha = 1;
self.text setText( self.slides[i].text );
if( !isdefined( self.image ) )
{
self.image = self createIcon( self.slides[i].image, self.slides[i].imagew, self.slides[i].imageh );
self.image setPoint( "", "", -75, 110 );
self.image.foreground = true;
}
if( !isdefined( self.image2 ) )
{
self.image2 = self createIcon( self.slides[i].image2, self.slides[i].imagew2, self.slides[i].imageh2 );
self.image2 setPoint( "", "", 75, 110 );
self.image2.foreground = true;
}
self waittill( "nextone" );
wait ( 2 );
self.image destroy();
self.image2 destroy();
self.text destroy();
self.title destroy();
}
self.image destroy();
self.image2 destroy();
self.text destroy();
self.title destroy();
self.background destroy();
self.border destroy();
}
FixString( text )
{
string = " " + text[0];
for( i = 1; i <= 320; i ++ )
{
if( !isdefined( text[i] ) )
break;
string += text[i];
if( ! isFloat( string.size / 40 ) && string.size > 10 )
string = string + "\n";
}
return ( string + " " );
}
CreateSlider( title, text, image, imagew, imageh, image2, imagew2, imageh2, glow, glowt )
{
i = self.slides.size;
self.slides[i] = spawnstruct();
if( isdefined( title ) )
self.slides[i].title = title;
if( isdefined( text ) )
self.slides[i].text = text;
if( isdefined( image ) )
self.slides[i].image = image;
if( isdefined( imagew ) )
self.slides[i].imagew = imagew;
if( isdefined( imageh ) )
self.slides[i].imageh = imageh;
if( isdefined( image2 ) )
self.slides[i].image2 = image2;
if( isdefined( imagew2 ) )
self.slides[i].imagew2 = imagew2;
if( isdefined( imageh2 ) )
self.slides[i].imageh2 = imageh2;
if( isdefined( glow ) )
self.slides[i].glow = glow;
if( isdefined( glowt ) )
self.slides[i].glowt = glowt;
}
Thankz.