06.05.2014, 10:42
how to go through all the players playing in the server and give randomly any one a prize.
do you know ?
do you know ?
stock giftsystem(playerid)
{
new rand = random(6);
switch(rand)
{
case 0:
{
GiveDodMoney(playerid, 5000);
SendClientMessage(playerid, COLOR_YELLOW,"*You gained random reward - $5000*");
}
case 1:
{
PlayerInfo[playerid][pMaterials] += 5000;
SendClientMessage(playerid, COLOR_YELLOW,"*You gained random reward - 5000 Materials*");
}
case 2:
{
GiveDodWeapon(playerid, 27, 99999);
SendClientMessage(playerid, COLOR_YELLOW,"*You gained random reward - SPAS*");
}
case 3:
{
GiveDodWeapon(playerid, 31, 99999);
SendClientMessage(playerid, COLOR_YELLOW,"*You gained random reward - M4*");
}
case 4:
{
PlayerInfo[playerid][pcocaine] += 10;
SendClientMessage(playerid, COLOR_YELLOW,"*You gained random reward - 10 grams of Cocaine*");
}
case 5:
{
PlayerInfo[playerid][pWeed] += 30;
SendClientMessage(playerid, COLOR_YELLOW,"*You gained random reward - 30 grams of Weed*");
}
}
}