Not generating BlodType... - 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: Not generating BlodType... (
/showthread.php?tid=468229)
Not generating BlodType... -
Scrillex - 07.10.2013
Hello dear samp members!
I need help with saving and generating code... Something ain't working well.
Need help about this code:
pawn Код:
stock Bloodtype(playerid)
{
new pBloodtype;
pBloodtype = 1 + random(6);
if(pBloodtype == 1)
if(pBloodtype == 2)
if(pBloodtype == 3)
if(pBloodtype == 4)
if(pBloodtype == 5)
if(pBloodtype == 6)
PlayerInfo[playerid][BloodType] = pBloodtype;
return pBloodtype;
}
stock BLOODTYPE(playerid)
{
new Type[32];
if(PlayerInfo[playerid][BloodType] == 1) format(Type, sizeof(Type), "A+");
else if(PlayerInfo[playerid][BloodType] == 2) format(Type, sizeof(Type), "A-");
else if(PlayerInfo[playerid][BloodType] == 3) format(Type, sizeof(Type), "B+");
else if(PlayerInfo[playerid][BloodType] == 4) format(Type, sizeof(Type), "B-");
else if(PlayerInfo[playerid][BloodType] == 5) format(Type, sizeof(Type), "C+");
else if(PlayerInfo[playerid][BloodType] == 6) format(Type, sizeof(Type), "C-");
return Type;
}
format(str, 128, "Your Blood Type: %s", BLOODTYPEd(playerid));
SendClientMessage(playerid, 0x9cfc14FF, str);
Re: Not generating BlodType... -
[SF]OutLawZ - 07.10.2013
Well that is a bad way of checking for a variable.
Код:
format(str, 128, "Your Blood Type: %s", PlayerInfo[playerid][BloodType]) SendClientMessage(playerid, 0x9cfc14FF, str);
Re: Not generating BlodType... -
Scrillex - 07.10.2013
Still the same thing.. But the thing is idk.. why it ain't saving and generating it...
Yeah I fixed it (thanks) But still idk why it ain't saving the type... (That "d" mistake at the end of bloodtype was just copy paste mistake)
Bodytype = 0