Raised This Month: $ Target: $400
 0% 

Silly Camper


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
timian
Member
Join Date: Oct 2006
Location: Denmark
Old 04-19-2009 , 16:31   Silly Camper
Reply With Quote #1

there is a bit erros in it. can you help me finding thees?

and is it possibel to do "if you dont move 5 sec (go into silly camper mode)"
silly camper mode = get random tip when activate / set maxhp to 25 / set max ap to 0 / set alpha to 10 (or just very low)

can somone help me do that in a way a beginner like me can understand?


Code:
// silly camper funny tip/invisibility/lesser HP

/* CVARS copy and past to shconfig.cfg

//silly camper
silly camper level 0    //set level to 0
silly camper hp            //set hp to 25 in silly camper mode
silly camper tip        //give funny tips when silly camper mode activate

*/
haspowers
#include <amxmod>
#include <superheromod>

//global variabels
new gHeroName[]="SillyCamper"
new gMoveTimer[SH_MAXSLOTS+1]
new bool:gHasSillyCamperPower[SH_MAXSLOTS+1]
//----------------------------------------------------------------------------------------------
public plugin_init() {
    //plugin info
    register_plugin("SUPERHERO SillyCamper", "0.1", "Beancake12")
    
    //DO NOT EDIT THIS FILE TO CHANGE CVARS, USE THE SHCONFIG.CFG
    register_cvar("SillyCamper_level", "0")
    register_cvar("SillyCamper_health", "25")
    register_cvar("SillyCamper_armor", "0")
    register_cvar("SillyCamperr_alpha", "10")
    
    //EVENT TO CREATE HERO
    shCreateHero(gHeroName, "tip/invisibility/lesser HP", "get when activate: funny tips/lot of invisibility/25hp")
    
    //INIT
    register_srvcmd("SillyCamper_init", "SillyCamper_init")
    shRegHeroInit(gHeroName, "SillyCamper_init")
    
    //TELL SERVER THAT SILLY CAMPER GOT SOME SPECIAL POWERS
    shSetMaxHealth(gHeroName, "SillyCamper_health")
    shSetMaxArmor(gHeroName, "SillyCamper_armor")
}
//----------------------------------------------------------------------------------------------
public SillyCamper_init() {
    //FIRST ARGUMENT
    new temp[6]
    read_argv(1, temp, 5)
    new id=str_to_num(temp)
    
    //SECOND ARGUMENT
    read_argv(2, temp, 5)
    new hasPowers = str_to_num(temp)
    gHasSillyCamperPower[id] = (hasPowers != 0)
    
    if(!hasPowers && gHasSillyCamperPower[id] && is_user_alive(id)) {
    shRemHealthPower(id)
    shRemArmorPower(id)
    }
}
timian is offline
timian
Member
Join Date: Oct 2006
Location: Denmark
Old 04-21-2009 , 15:02   Re: Silly Camper
Reply With Quote #2

can't someone help me!?

don't you understand my question or is it just too advanced ???
timian is offline
micke1101
Veteran Member
Join Date: Jan 2008
Location: Banned-town
Old 04-21-2009 , 15:51   Re: Silly Camper
Reply With Quote #3

Well what i can see just by looking little fast is that haspowers below the cvars will confuse the compiler since its not a command
And also your including amxmod which should be amxmodx
and the reason probably is cause youre trying to make a 1.18 superhero and well i think the most support have been moved to the 1.2's
micke1101 is offline
yang
Veteran Member
Join Date: May 2005
Location: galoreservers.net
Old 04-26-2009 , 19:27   Re: Silly Camper
Reply With Quote #4

look at sh_skeleton or whatever its called. Comes in official SVN so you can mess around with that.
__________________
yang is offline
Send a message via AIM to yang
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 23:18.


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