AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   I need simpel help! (https://forums.alliedmods.net/showthread.php?t=75629)

Gudik 08-09-2008 06:33

I need simpel help!
 
Hi i have trying making a plugin (im new its my first one)

I making a "Ghostmod" so when you say Ghostme it will set you alpha and you can only get knife and more hp and ap :D

But!
Then script so the ghost can't pick up weapon works, but non-ghosts can't either pick up weapons :S

It's something with some If (Ghost(id) == 1/ture) { code }

Can you help me? :)

Code:

#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>
#include <fakemeta>
#define PLUGIN "Ghost Mod"
#define VERSION "1.0"
#define AUTHOR "Gudik"
 
public plugin_init()
{
 register_plugin("Ghost Mod", "1.0", "Gudik");
 register_clcmd("Ghostme", "Ghost");
 register_event("WeapPickup", "event_weap_pickup", "be", "1!29");
 
}
public Ghost(id)
 
{
 set_user_health(id, 200);
 set_user_rendering(id, kRenderFxGlowShell, 255, 255, 255, kRenderTransAlpha, 60);
 set_user_armor(id, 200);
 set_user_gravity(id, 0.5);
 strip_user_weapons(id);
 client_print(id, print_chat, "[GhostMod] You are now a Ghost Go kill!!");
 client_print(id, print_chat, "[GhostMod] You Have now 200 health and 200 armor!");
 client_print(id, print_chat, "[GhostMod] You can only have Knife!");
 give_item(id, "weapon_knife");
}
public event_weap_pickup(id) {
 
  set_task(0.1, "RemovePickedWeapon", id);
}
public RemovePickedWeapon(id) {
  engclient_cmd(id, "drop", "weapon_c4")
  strip_user_weapons(id)
  give_item(id,"weapon_knife")
}

Here is the code without variables and this :S
I hope you can help me :)

YamiKaitou 08-09-2008 10:38

Re: I need simpel help!
 
As per the Global Forum Rules, you need to have a descriptive topic title. If you wish for this topic to stay open, please correct the topic title before you post again.


Moved

PvtSmithFSSF 08-09-2008 11:10

Re: I need simpel help!
 
you've got to make a bool and set the bool to false whenever a player joins the server or on respawn/round start.

when they type ghostme set the bool to true.

then make the set_task inside and IF statement, and make the if statement check if the bool is true.

Dores 08-10-2008 12:37

Re: I need simpel help!
 
Quote:

Originally Posted by PvtSmithFSSF (Post 666993)
you've got to make a bool and set the bool to false whenever a player joins the server or on respawn/round start.

when they type ghostme set the bool to true.

then make the set_task inside and IF statement, and make the if statement check if the bool is true.

yep. :D

Iwon 08-10-2008 18:20

Re: I need simpel help!
 
where is noclip in ghost huh :D


All times are GMT -4. The time now is 05:34.

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