SA-MP Forums Archive
Problema in skin randoms - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Problema in skin randoms (/showthread.php?tid=660946)



Problema in skin randoms - Spawe - 18.11.2018

why not give the skin randoms to each team

How do I give him a random skin when he dies too?

Code:

PHP код:

new Dragons[] = { 4, 6, 14, 32, 44, 195 };
new 
Templarios[] = { 58, 66, 72, 95, 122, 184 };
new 
Members[] = { 293, 292, 273, 195, 134, 8 };
//OnGameModeInit
    
AddPlayerClassEx(DRAGONS, Dragons[random(6)], 318.8639,1121.6978,1083.8828,180.1659, 24,99999, 0,0, 0,0);
    
AddPlayerClassEx(TEMPLARIO, Templarios[random(6)], 2264.5317,-1209.7946,1049.0234,253.0367, 24,99999, 0,0, 0,0);
    
AddPlayerClassEx(MEMBERS, Members[random(6)], 2324.6138,-1143.4207,1050.4922,178.6559, 24,99999, 0,0, 0,0); 



Re: Problema in skin randoms - Mencent - 18.11.2018

Hello!

Try this:
PHP код:
//OnGameModeInit
AddPlayerClassEx(DRAGONS, random(Dragons), 318.8639,1121.6978,1083.8828,180.1659, 24,99999, 0,0, 0,0);
AddPlayerClassEx(TEMPLARIO, random(Templarios), 2264.5317,-1209.7946,1049.0234,253.0367, 24,99999, 0,0, 0,0);
AddPlayerClassEx(MEMBERS, random(Members), 2324.6138,-1143.4207,1050.4922,178.6559, 24,99999, 0,0, 0,0); 
EDIT: Sorry, it's a mistake!


Re: Problema in skin randoms - Spawe - 18.11.2018

in the to all lines the error is


PHP код:
error 035: argument type mismatch (argument 1) 



Re: Problema in skin randoms - FedeA - 18.11.2018

How you defined DRAGONS, TEMPLARIOS and MEMBERS? #define?

This worked for me.
Код:
	
        #define DRAGONS 1
	#define TEMPLARIO 2
	#define MEMBERS 3
	
        new Dragons[] = { 4, 6, 14, 32, 44, 195 }; 
	new Templarios[] = { 58, 66, 72, 95, 122, 184 }; 
	new Members[] = { 293, 292, 273, 195, 134, 8 }; 
	
//OnGameModeInit 
    AddPlayerClassEx(DRAGONS, Dragons[random(6)], 318.8639,1121.6978,1083.8828,180.1659, 24,99999, 0,0, 0,0); 
    AddPlayerClassEx(TEMPLARIO, Templarios[random(6)], 2264.5317,-1209.7946,1049.0234,253.0367, 24,99999, 0,0, 0,0); 
    AddPlayerClassEx(MEMBERS, Members[random(6)], 2324.6138,-1143.4207,1050.4922,178.6559, 24,99999, 0,0, 0,0);



Re: Problema in skin randoms - Spawe - 19.11.2018

If I have it defined like this


PHP код:
#define DRAGONS           6
#define TEMPLARIO         7
#define MEMBERS           8