05.08.2010, 16:33
I'm not sure but you could try this:
Add this at bottom of your code:
Command:
Let me know if it works. I just typed it fastly. 
Greetz.
Add this at bottom of your code:
pawn Код:
stock GetRandomHint(Pickup)
{
new string[50];
switch(Pickup)
{
case 0: format(string, sizeof(string), "near the station");
case 1: format(string, sizeof(string), "at the stadium");
case 2: format(string, sizeof(string), "under a bridge in LS/Ganton");
case 3: format(string, sizeof(string), "upon a tower in LV");
case 4: format(string, sizeof(string), "in LSPD of Las Venturas");
case 5: format(string, sizeof(string), "at ship in LV");
//So many cases as you have pickups.
}
return string;
}
pawn Код:
if(strcmp(cmdtext, "/randommoney", true) == 0) {
if(Pinfo[playerid][Level] >= 6){
new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, MAX_PLAYER_NAME);
format(string,sizeof string, "Administrator: %s has started the money pickup event.", name);
SendClientMessageToAll(COLOR_RED, string);
new rand = random(sizeof(RandomMoney));
moneypickup = CreatePickup(1550, 2, RandomMoney[rand][0], RandomMoney[rand][1], RandomMoney[rand][2], -1);
format(string,sizeof string, "Hint: The pickup is %s.", GetRandomHint(rand));
SendClientMessageToAll(COLOR_RED, string);
return 1;
}
else return SendClientMessage(playerid, COLOR_RED, "You do not have access to this command.");
}

Greetz.

