AlliedModders

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

M4Maniac 02-28-2006 10:08

Weapon_ID
 
Quote:

new weapid = read_data(2); // get the weapon ID
That is for my new plugin for a new server skin, the deagle. What do i put for that?

VEN 02-28-2006 13:36

what?

M4Maniac 02-28-2006 18:03

I have created a plugin for my custom skin on my server, It has some things that idk what to fill in for them. They are:
Quote:

public set_models(id) {
if(!is_user_alive(id)) { // if the player is dead for some reason, prevent the rest of the function from being executed
return PLUGIN_CONTINUE;
}

new weapid = read_data(2); // get the weapon ID

switch(weapid) {
case CSW_M4A1: {
entity_set_string(id , EV_SZ_viewmodel , "models/v_deagle.mdl"); // set the view model
entity_set_string(id , EV_SZ_weaponmodel , "models/p_deagle.mdl"); // set the player (view) model
}

Brad 02-28-2006 20:19

Moved from "Support/Help" forum.

GHW_Chronic 02-28-2006 20:27

wtf I answered this already YOU MISUNDERSTOOD WHAT V3X SAID. YOU DO NOT HAVE TO CHANGE THAT LINE. INSTEAD CHANGE THIS:

Code:
switch(weapid) { case CSW_M4A1: {

TO

Code:
switch(weapid) { case ?????: {

WHERE ? IS THE CS WEAPON CONSTANT!

REPEAT, YOU DO NOT NEED TO CHANGE THAT LINE. when v3x said " get the weapon ID" you do not need to change that line, he is describing what that line does.

Yes, caps do help me read better too.

M4Maniac 02-28-2006 21:45

No no, That was an earyler post and i realised i had posted in the wrong place so i decided to move it.


All times are GMT -4. The time now is 20:18.

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