AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   ESF Scripting Help Please (https://forums.alliedmods.net/showthread.php?t=21796)

swobj 12-10-2005 16:28

ESF Scripting Help Please
 
Well, I'm pretty new to coding, and have been looking through peoples source, and trying to understand coding for a bit now. I just have a few questions on how to put things into script.

1. How do you tell a client to kill itself, Like as if you typed "kill" in console

2. How do you detect if a person comes back alive after being killed after executing the script to kill the player

3. How do you remove weapons/attacks, I know how to add them, but how do you remove an individual weapon/attacks.

4. How do you make a sprite play at the origin of the character, like a transformation sprite, and how do you make the player pause completely while its showing the sprite, and make the model do an animation while the sequence is being played.

5. After Question 4 Finishes displaying the sprite, how do you detect that it is finished

6. Is there a way to add more weapons/attacks through scripting.

I would appreciate it much if anyone could provide any help at all to any of these questions.

Thanks Ahead of time.

Des12 12-10-2005 20:36

for #1 and #2, I quickly threw together this script, if it dosen't work tell me.

Code:
#include <amxmodx> #include <amxmisc> new slayed[33] = 0 public plugin_init() {        register_plugin("Admin Kill","v1","Dest12")        register_concmd("amx_kill","killPlayer",ADMIN_SLAY," - Kills a player")        register_event("ResetHUD","playerRespawn", "be") } public killPlayer(id,level,cid) {     if (!cmd_access(id,level,cid,2))            return PLUGIN_HANDLED     new arg[32]     read_argv(1,arg,31)     new player = cmd_target(id,arg,5)     if (!player) return PLUGIN_HANDLED     client_cmd(player,"kill")     new name[32], name2[32]     get_user_name(id, name, 31)     get_user_name(player, name2, 31)     client_print(0,print_chat,"[AMXX] %s made %s kill himself!",name,name2)     slayed[player] = 1     return PLUGIN_HANDLED } public playerRespawn(id) {      if(slayed[id] == 1) {          new name[32]          get_user_name(id, name , 31)          client_print(0,print_chat,"[AMXX] %s has respawned from being killed by an admin!",name)          slayed[id] = 0      }      return PLUGIN_HANDLED }

For #6, search for the WTF module (actually called that I think)

swobj 12-11-2005 02:20

Thanks much for your help des. I'll see what I can do with what you've got there. BTW thanks for the tip on the wtf module, ill be soon exploring that in and out.


All times are GMT -4. The time now is 16:08.

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