AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How get weapon...ammo and all from one player (https://forums.alliedmods.net/showthread.php?t=2552)

sanaell 06-08-2004 09:47

How get weapon...ammo and all from one player
 
all in the title
How i can get with Id

Weapons (all)
Ammo (all)
Gren (all)
and items

I need to give exactly to another guy all weapon from another :)

like
amx_givew P1 P2
and all the P1 have P2 reget

Thx

ts2do 06-08-2004 11:13

you use get_user_weapons
then find_ent_by_owner with the user id as the owner and the weaponname as the entity

sanaell 06-08-2004 16:52

i ve made that...


Code:
nvg = 0    new ammo[30]    for (new i=0;i < 30;i++) {     if (i!=2 || i!=6) ammo[i] = cs_get_user_bpammo(victimIndex,i+1)    }    Vmoney = cs_get_user_money(victimIndex)    nvg = cs_get_user_nvg(victimIndex)

and

Code:
cs_set_user_team(victimIndex,1)          user_kill(victimIndex,0)          spawn(victimIndex)          cs_set_user_money(victimIndex,Vmoney)          for (new i=0;i < 30;i++) {             if (i!=2 || i!=6) cs_set_user_bpammo(victimIndex,i+1,ammo[i])             if (ammo[i])give_item(victimIndex,armement[i])          }          cs_set_user_nvg(victimIndex,nvg)


But i can t test it because i can found player lollllllllllll

when i type

command #id or pseudo....

is an error in find_player ?

Code:
new playerName[33]    read_argv(1,playerName,32)    new target    target = find_player("a",playerName)    if(!target) target = find_player("k",playerName)    if(!target) target = find_player("c",playerName)    if(!target){       client_print(id,print_chat,msgs[13])       return PLUGIN_HANDLED    }


All times are GMT -4. The time now is 14:45.

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