07.10.2013, 08:12
Hello dear samp members!
I need help with saving and generating code... Something ain't working well.
Need help about this code:
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);