Raised This Month: $ Target: $400
 0% 

MULTI set_user_origin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Ex3cuTioN
Member
Join Date: May 2010
Old 07-06-2010 , 11:04   MULTI set_user_origin
Reply With Quote #1

I have a problem...a big one

When i type in chat /start i want 5 T and 5 CT to teleport at the coordonates below.

PHP Code:
new T1[3] = { -240, -150, -91 }
new 
T2[3] = { -240, -230, -91 }
new 
T3[3] = { -240, -330, -91 }
new 
T4[3] = { -240, -430, -91 }
new 
T5[3] = { -240, -530, -91 }

new 
CT1[3] = { 350, -150, -91 }
new 
CT2[3] = { 350, -230, -91 }
new 
CT3[3] = { 350, -330, -91 }
new 
CT4[3] = { 350, -430, -91 }
new 
CT5[3] = { 350, -530, -91 
PHP Code:
public KnifeDuel()
{
    new 
players[32], num,i;
    
    
get_players(playersnum);
    
    for (
i=0i<numi++)
    {
        if(
get_user_team(players[i]) == 1)
        {
            
set_user_origin(players[i],T1);
            
cs_reset_user_model(players[i]);
            
fm_strip_user_weapons(players[i]);
            
fm_give_item(players[i],"weapon_knife");//real
        
}
        
        else if(
get_user_team(players[i]) == 2)
        {
            
set_user_origin(players[i], CT1);
            
cs_reset_user_model(players[i]);
            
fm_strip_user_weapons(players[i]);
            
fm_give_item(players[i],"weapon_knife");//real
        
}
    }

You must understand the situation very easy...
Ex3cuTioN is offline
abdul-rehman
Veteran Member
Join Date: Jan 2010
Location: Khi, Pakistan
Old 07-06-2010 , 11:26   Re: MULTI set_user_origin
Reply With Quote #2

Quote:
Originally Posted by Ex3cuTioN View Post
I have a problem...a big one

When i type in chat /start i want 5 T and 5 CT to teleport at the coordonates below.

Code:
new T1[3] = { -240, -150, -91 } new T2[3] = { -240, -230, -91 } new T3[3] = { -240, -330, -91 } new T4[3] = { -240, -430, -91 } new T5[3] = { -240, -530, -91 }   new CT1[3] = { 350, -150, -91 } new CT2[3] = { 350, -230, -91 } new CT3[3] = { 350, -330, -91 } new CT4[3] = { 350, -430, -91 } new CT5[3] = { 350, -530, -91 }

Code:
public KnifeDuel() {     new players[32], num,i;       get_players(players, num);       for (i=0; i<num; i++)     {         if(get_user_team(players[i]) == 1)         {             set_user_origin(players[i],T1);             cs_reset_user_model(players[i]);             fm_strip_user_weapons(players[i]);             fm_give_item(players[i],"weapon_knife");//real         }           else if(get_user_team(players[i]) == 2)         {             set_user_origin(players[i], CT1);             cs_reset_user_model(players[i]);             fm_strip_user_weapons(players[i]);             fm_give_item(players[i],"weapon_knife");//real         }     } }

You must understand the situation very easy...
So whats the problem then...??
You didnt explain it above...!
__________________

My Plugins For ZP

Inactive due to College and Studies
abdul-rehman is offline
Send a message via Yahoo to abdul-rehman Send a message via Skype™ to abdul-rehman
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 07-06-2010 , 11:29   Re: MULTI set_user_origin
Reply With Quote #3

PHP Code:
public KnifeDuel()
{
    new 
players[32], numitempid;
    
    
get_players(playersnum);
    
    for (
i=0i<numi++)
    {
        
tempid players[i];
        
        if(
get_user_team(tempid) == 1)
        {
            
set_user_origin(tempid,T1);
            
cs_reset_user_model(tempid);
            
fm_strip_user_weapons(tempid);
            
fm_give_item(tempid,"weapon_knife");//real
        
}
        
        else if(
get_user_team(tempid) == 2)
        {
            
set_user_origin(tempidCT1);
            
cs_reset_user_model(tempid);
            
fm_strip_user_weapons(tempid);
            
fm_give_item(tempid,"weapon_knife");//real
        
}
    }

Try this, and i think it's better to use strip_user_weapons and give_item from the fun module
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
Ex3cuTioN
Member
Join Date: May 2010
Old 07-06-2010 , 11:42   Re: MULTI set_user_origin
Reply With Quote #4

Let me explain to you

PHP Code:
new T1[3] = { -240, -150, -91 // for 1 T player
new T2[3] = { -240, -230, -91 // for another one
new T3[3] = { -240, -330, -91 // for another one
new T4[3] = { -240, -430, -91 // for another one
new T5[3] = { -240, -530, -91 // for another one
 
new CT1[3] = { 350, -150, -91 // for 1 CT player
new CT2[3] = { 350, -230, -91 // for another one CT
new CT3[3] = { 350, -330, -91 // for another one CT 
new CT4[3] = { 350, -430, -91 // for another one CT 
new CT5[3] = { 350, -530, -91 // for another one CT 
I mean set_user_origin(tempid,T1); that T1 makes all the players from the 'for' that are T to teleport in the same place...and the story is same with CT's...
Ex3cuTioN is offline
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 07-06-2010 , 11:43   Re: MULTI set_user_origin
Reply With Quote #5

Should something like this:

Code:
new const Float:TerroristOrigins[5][3] = {     {-240, -150, -91},     {-240, -230, -91},     {-240, -330, -91},     {-240, -430, -91},     {-240, -530, -91} } new const Float:CounterOrigins[5][3] = {     {350, -150, -91},     {350, -230, -91},     {350, -330, -91},     {350, -430, -91},     {350, -530, -91} } public KnifeDuel() {     new players[32], num, tt, ct, id;         get_players(players, num);         for(new i = 0; i < num; i++)     {         id = players[i];                 if(cs_get_user_team(id) == CS_TEAM_T)         {             if(tt > 5) return;                         set_pev(id, pev_origin, TerroristOrigins[tt]);             cs_reset_user_model(id);             strip_user_weapons(id);             give_item(id, "weapon_knife");                         tt++;         }                 else if(cs_get_user_team(id) == CS_TEAM_CT)         {             if(ct > 5) return;                         set_pev(id, pev_origin, CounterOrigins[ct]);             cs_reset_user_model(id);             strip_user_weapons(id);             give_item(id, "weapon_knife");                         ct++;         }     } }

But for some reasons that i don't know i get tag mismatch :/
__________________
Approved Plugins - Steam Profile

Public non-terminated projects:
All Admins Menu, HLTV parameters, Subnick,
Second Password (cool style), InfoZone,
Binary C4 plant/defuse, and more...

Private projects:
NoSpec (+menu), NV Surf Management,
PM Adanved System, KZ longjump2, and more...

Last edited by Alucard^; 07-06-2010 at 11:46.
Alucard^ is offline
Send a message via Skype™ to Alucard^
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 07-06-2010 , 11:49   Re: MULTI set_user_origin
Reply With Quote #6

Code:
 const Float:TerroristOrigins[5][3] =

Code:
 
new const: TerroristOrigins[5][3] =
The data that it holds are not floats. That's why you get tag mismatch
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.

Last edited by drekes; 07-06-2010 at 11:53.
drekes is offline
Send a message via MSN to drekes
Ex3cuTioN
Member
Join Date: May 2010
Old 07-06-2010 , 11:52   Re: MULTI set_user_origin
Reply With Quote #7

Thanks Alucard^ but

PHP Code:
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c1997-2006 ITB CompuPhaseAMX Mod X Team

Warning
Tag mismatch on line 67
Warning
Tag mismatch on line 67
Warning
Tag mismatch on line 67
Warning
Tag mismatch on line 68
Warning
Tag mismatch on line 68
Warning
Tag mismatch on line 68
Warning
Tag mismatch on line 69
Warning
Tag mismatch on line 69
Warning
Tag mismatch on line 69
Warning
Tag mismatch on line 70
Warning
Tag mismatch on line 70
Warning
Tag mismatch on line 70
Warning
Tag mismatch on line 71
Warning
Tag mismatch on line 71
Warning
Tag mismatch on line 71
Warning
Tag mismatch on line 76
Warning
Tag mismatch on line 76
Warning
Tag mismatch on line 76
Warning
Tag mismatch on line 77
Warning
Tag mismatch on line 77
Warning
Tag mismatch on line 77
Warning
Tag mismatch on line 78
Warning
Tag mismatch on line 78
Warning
Tag mismatch on line 78
Warning
Tag mismatch on line 79
Warning
Tag mismatch on line 79
Warning
Tag mismatch on line 79
Warning
Tag mismatch on line 80
Warning
Tag mismatch on line 80
Warning
Tag mismatch on line 80
Warning
Symbol is assigned a value that is never used"gHudSyncObj" on line 1115
Warning
Symbol is assigned a value that is never used"gMsgSendAudio" on line 1115
Header size
:           2756 bytes
Code size
:            28572 bytes
Data size
:            15868 bytes
Stack
/heap size:      16384 bytesmaxusage is unknowndue to recursion
Total requirements
:   63580 bytes

32 Warnings
.
Done
And my server crash when i say /start

Thanks drekes but

PHP Code:
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c1997-2006 ITB CompuPhaseAMX Mod X Team

Error
Invalid symbol name "" on line 69
Error
Invalid function or declaration on line 74
Error
Invalid symbol name "" on line 78
Error
Invalid function or declaration on line 83
Warning
Tag mismatch on line 763
Error
: Array sizes do not match, or destination array is too small on line 763
Warning
Tag mismatch on line 771
Error
: Array sizes do not match, or destination array is too small on line 771
Warning
Symbol is assigned a value that is never used"gHudSyncObj" on line 1121
Warning
Symbol is assigned a value that is never used"gMsgSendAudio" on line 1121

6 Errors
.
Could not locate output file I:\HLDS\cstrike\addons\amxmodx\plugins\hnswar.amx (compile failed). 

Line 69 is { -240, -150, -91 }

Last edited by Ex3cuTioN; 07-06-2010 at 11:55.
Ex3cuTioN is offline
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 07-06-2010 , 11:53   Re: MULTI set_user_origin
Reply With Quote #8

check my previous post
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
Ex3cuTioN
Member
Join Date: May 2010
Old 07-06-2010 , 11:56   Re: MULTI set_user_origin
Reply With Quote #9

Look at my previous post i edited
Ex3cuTioN is offline
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 07-06-2010 , 11:57   Re: MULTI set_user_origin
Reply With Quote #10

could you post the full code block like you have it now?
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:09.


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