Raised This Month: $ Target: $400
 0% 

[ES] Detectar Mapa y Containi


  
 
 
Thread Tools Display Modes
Author Message
Kiske
Veteran Member
Join Date: May 2009
Old 03-23-2010 , 09:57   [ES] Detectar Mapa y Containi
#1

Bleh, no sabia que titulo ponerle...

PHP Code:
    static MapName[32]
    
get_mapnameMapName31 )
    
    if( !
containiMapName"jb_" ) || !containiMapName"jail_" ) )
        
set_fail_state"Sory, this Plugin only works in jailbreaks maps." 
Quiero que si el nombre del Mapa NO contiene: jb_ o jail_
Quiero que envie ese Mensaje a la consola.

Cuando entro a cualquier mapa, contenga o no contenga jail_ me tira el error igual.
__________________

Kiske is offline
Send a message via Skype™ to Kiske
lucas_7_94
Leche Loco
Join Date: Mar 2009
Location: Argentina
Old 03-23-2010 , 10:06   Re: [ES] Detectar Mapa y Containi
#2

Intenta asi.

PHP Code:
public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    static 
MapName[32]
    
get_mapnameMapName31 )
    
    if( !
containiMapName"jb_" ) == -|| !containiMapName"jail_" ) == -)
        
set_fail_state"Sory, this Plugin only works in jailbreaks maps." 

__________________
ATWWMH - MiniDuels
Madness is like gravity, just need a little push.
lucas_7_94 is offline
Send a message via Skype™ to lucas_7_94
shinoda
Spanish Moderator
Join Date: Nov 2009
Location: ag_crossfire
Old 03-23-2010 , 10:32   Re: [ES] Detectar Mapa y Containi
#3

El resultado tiene que ser distinto a -1
osea != -!

Creo *-)
__________________
Oh hell no this shit is awesome !!!
shinoda is offline
Send a message via MSN to shinoda Send a message via Skype™ to shinoda
Kiske
Veteran Member
Join Date: May 2009
Old 03-23-2010 , 10:44   Re: [ES] Detectar Mapa y Containi
#4

Sigue tirando el mismo error.

Lo puse así:
PHP Code:
    static MapName[32]
    
get_mapnameMapName31 )
    
    if( !
containiMapName"jail_" ) != -)
        
set_fail_state"Sory, this Plugin only works in jailbreaks maps." 
Y me tira TagMismatch en el if.
__________________


Last edited by Kiske; 03-23-2010 at 10:50.
Kiske is offline
Send a message via Skype™ to Kiske
Old 03-23-2010, 11:05
lucas_7_94
This message has been deleted by lucas_7_94. Reason: nono , me equivoqe :D
shinoda
Spanish Moderator
Join Date: Nov 2009
Location: ag_crossfire
Old 03-23-2010 , 11:38   Re: [ES] Detectar Mapa y Containi
#5

PHP Code:
if(!(containi(MapName"jail_") != -1)) 
__________________
Oh hell no this shit is awesome !!!
shinoda is offline
Send a message via MSN to shinoda Send a message via Skype™ to shinoda
IneedHelp
Veteran Member
Join Date: Mar 2007
Location: Argentina
Old 03-23-2010 , 11:51   Re: [ES] Detectar Mapa y Containi
#6

PHP Code:
if (!equal(MapName"jail_"5) || !equal(MapName"jb_"3)) // blah 
es otra opcion..

Te tira tag mismatch porq el ! en el containi no hace falta...encerralo entre parentesis+
__________________

Last edited by IneedHelp; 03-23-2010 at 11:55.
IneedHelp is offline
shinoda
Spanish Moderator
Join Date: Nov 2009
Location: ag_crossfire
Old 03-23-2010 , 11:56   Re: [ES] Detectar Mapa y Containi
#7

Quote:
Originally Posted by IneedHelp View Post
PHP Code:
if (equal(MapName"jail_"5) || equal(MapName"jb_"3)) // blah 
es otra opcion..
Porque el 5 y el 3 ???
__________________
Oh hell no this shit is awesome !!!
shinoda is offline
Send a message via MSN to shinoda Send a message via Skype™ to shinoda
AntiBots
Veteran Member
Join Date: May 2008
Location: Brazil
Old 03-23-2010 , 12:17   Re: [ES] Detectar Mapa y Containi
#8

Quote:
Originally Posted by IneedHelp View Post
PHP Code:
if (!equal(MapName"jail_"5) || !equal(MapName"jb_"3)) // blah 
es otra opcion..

Te tira tag mismatch porq el ! en el containi no hace falta...encerralo entre parentesis+
Mejor Opcion.
__________________
AntiBots is offline
Send a message via ICQ to AntiBots Send a message via MSN to AntiBots Send a message via Skype™ to AntiBots
L//
Senior Member
Join Date: Aug 2008
Location: Not found
Old 03-23-2010 , 14:24   Re: [ES] Detectar Mapa y Containi
#9

Quote:
Originally Posted by IneedHelp View Post
PHP Code:
if (!equal(MapName"jail_"5) && !equal(MapName"jb_"3)) // blah 
&&

EDIT: el error ya venia desde el post #1
__________________

Last edited by L//; 03-23-2010 at 14:26.
L// is offline
Send a message via MSN to L//
Starsailor
horrible hahah
Join Date: Aug 2008
Location: Buenos Aires
Old 03-23-2010 , 14:28   Re: [ES] Detectar Mapa y Containi
#10

PHP Code:
set_fail_state(".. 
-->
PHP Code:
pause("ad"
__________________
Find my plugins here..

Ex - Spanish Moderator.
Starsailor is offline
 



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 18:49.


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