I Cant Stop x3 Posted May 5, 2013 Posted May 5, 2013 (edited) hello guys i have created an mvp points npc, whell i have a question if its possible to share the points in party? this is my points : OnMvPKill: set .MvpPoint,rand(150,300); set MvpPoint,MvpPoint+.MvpPoint; i need to share it for 5 party members in the same map Edited May 5, 2013 by nhofije Quote
Capuche Posted May 6, 2013 Posted May 6, 2013 Try this if ( getcharid(1) ) { .@party_id = getcharid(1); .@map$ = strcharinfo(3); getpartymember .@party_id; getpartymember .@party_id, 2; .@count = $@partymembercount; copyarray .@aid, $@partymemberaid, .@count; copyarray .@name$, $@partymembername$, .@count; for ( ; .@i < $@partymembercount; .@i++ ) if ( getcharid( 0,$@partymembername$[.@i] ) ) { getmapxy .@tmp$, .@x, .@y, 0, $@partymembername$[.@i]; if ( .@tmp$ != .@map$ ) { deletearray .@aid[.@i], 1; deletearray .@name$[.@i], 1; .@count -= 1; } } while ( .@count > 5 ) { .@r = rand( .@count ); deletearray .@aid[.@r], 1; deletearray .@name$[.@r], 1; .@count -= 1; } for ( .@i = 0; .@i < .@count; .@i++ ) { attachrid .@aid[.@i]; set MvpPoint,MvpPoint+.MvpPoint; } } else set MvpPoint,MvpPoint+.MvpPoint; The killer share the points with 5 players in the party, only if the member is online and on the same map 1 Quote
I Cant Stop x3 Posted May 6, 2013 Author Posted May 6, 2013 (edited) I read the doc , but I did not understand ,and this solved my problem, thanks fot it sir capuche Edited May 6, 2013 by nhofije Quote
Question
I Cant Stop x3
hello guys i have created an mvp points npc, whell i have a question if its possible to share the points in party?
this is my points :
i need to share it for 5 party members in the same map
Edited by nhofije2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.