Random Sklin
#1

Hey all

I have a little trouble with Random Skin


here is male and female skin:
Код:
new male[52][1] = {
// Male civilians down here (by Ellis)
{2},
{47},
{48},
{50},
{58},
{60},
{68},
{72},
{73},
{80},
{81},
{82},
{83},
{95},
{100},
{101},
{102},
{103},
{104},
{108},
{109},
{110},
{121},
{122},
{123},
{135},
{142},
{143},
{144},
{146},
{153},
{154},
{155},
{156},
{158},
{159},
{160},
{161},
{170},
{179},
{180},
{189},
{202},
{203},
{204},
{258},
{259},
{260},
{293},
{295},
{296},
{297}
};

new female[33][2] = {
// Female civilians down here (by Ellis)
{55},
{56},
{63},
{69},
{76},
{85},
{91},
{93},
{131},
{141},
{148},
{150},
{151},
{152},
{157},
{169},
{172},
{190},
{192},
{193},
{194},
{195},
{198},
{201},
{214},
{216},
{219},
{225},
{233},
{237},
{251},
{263},
{298}
};
When player press Male or Female they should got a message and random skin:
Код:
   	if(dialogid == 12) //Jei dialogid bus lygus 1
	{

		if(!response) //Jei paspaude mygtuka moteris
		{
			playerDB[playerid][lytis] = 0;
			new stringai[128];
			format(stringai,sizeof(stringai),"Taigi, %s, jūs esate moteris :) Prisijunkite ir gerai praleiskite laiką ;]:",name);
			new femaleskin;
   			femaleskin = random(sizeof(female));
		    SetPlayerSkin(playerid, femaleskin);
		    SetPlayerSkin(playerid, femaleskin);
			ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"Prisijungimas",stringai,"Prisijungti","Iљeiti");
			return 1;
		}

		if(response) //Jei paspaude mygtuka vyras
		{

			playerDB[playerid][lytis] = 1;
			new stringai[128];
			format(stringai,sizeof(stringai),"Taigi, %s, jūs esate vyras :) Prisijunkite ir gerai praleiskite laiką ;]:",name);
   			new maleskin;
		    maleskin = random(sizeof(male));
		    SetPlayerSkin(playerid, maleskin);
			ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"Prisijungimas",stringai,"Prisijungti","Iљeiti");
			return 1;
		}
	}
But I have warrings:
Код:
C:\Documents and Settings\Tomas\Desktop\LTG_5.5v_LT\LTG 5.5v LT\gamemodes\GRP.pwn(15762) : warning 203: symbol is never used: "female"
C:\Documents and Settings\Tomas\Desktop\LTG_5.5v_LT\LTG 5.5v LT\gamemodes\GRP.pwn(15762) : warning 203: symbol is never used: "male"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Warnings.
Who know what it is wrong in this script?

P.S My english poor, I think you understand me
Reply
#2

pawn Код:
#pragma unused male
#pragma unused female
Reply
#3

You never even use those variables in your script, that's what the warning is telling you. Your code won't work either, you want it to select a random cell in the variable, not set it to the random number.

pawn Код:
SetPlayerSkin(playerid, female[femaleskin]);
Reply
#4

You defined these functions, without using them in your script.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)