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)
}
}