10.12.2012, 05:50
If somebody can help me with this will be very good for me
thanks
thanks
pawn Код:
forward Fishing(playerid);
public Fishing(playerid)
{
new string[1024];
if(IsPlayerConnected(playerid))
{
new weight = randomEx(1000,1800);
new money = randomEx(100, 300);
new rand = randomEx(1, 7);
new fish = random(FishNames);
if(rand == 1)
{
SendClientMessage(playerid,0x2641FEAA,"You just caught some trash in your net and throwed it back in sea");
IsFishing[playerid] = 0;
TogglePlayerControllable(playerid,true);
return 1;
}
else if(rand == 2)
{
format(string, sizeof(string),"You just caught in your net a %s, %s, %s.", randfish(fish), randfish(fish), randfish(fish)); // Here
SendClientMessage(playerid, 0x2641FEAA, string);
Fishes[playerid] += 3;
IsFishing[playerid] = 0;
FishWeight[playerid] += weight;
TogglePlayerControllable(playerid,true);
return 1;
}
else if(rand == 3)
{
format(string, sizeof(string), "You just caught in your net a %s, %s, %s, %s.", randfish(fish), randfish(fish), randfish(fish), randfish(fish));
SendClientMessage(playerid, 0x2641FEAA, string);
Fishes[playerid] += 4;
IsFishing[playerid] = 0;
FishWeight[playerid] += weight;
TogglePlayerControllable(playerid,true);
return 1;
}
else if(rand == 4)
{
format(string, sizeof(string), "You just caught in your net a %s, %s, %s, %s, %s.", randfish(fish), randfish(fish), randfish(fish), randfish(fish), randfish(fish));
SendClientMessage(playerid, 0x2641FEAA, string);
Fishes[playerid] += 5;
IsFishing[playerid] = 0;
FishWeight[playerid] += weight;
TogglePlayerControllable(playerid,true);
return 1;
}
else if(rand == 5)
{
format(string, sizeof(string), "You just caught in your net a %s, %s, %s, %s, %s, s%.", randfish(fish), randfish(fish), randfish(fish), randfish(fish), randfish(fish), randfish(fish));
SendClientMessage(playerid, 0x2641FEAA, string);
Fishes[playerid] += 6;
IsFishing[playerid] = 0;
FishWeight[playerid] += weight;
TogglePlayerControllable(playerid,true);
return 1;
}
else if(rand == 6)
{
format(string, sizeof(string), "You just caught in your net a %s, %s, %s, %s, %s, s%, %s.", randfish(fish), randfish(fish), randfish(fish), randfish(fish), randfish(fish), randfish(fish), randfish(fish));
SendClientMessage(playerid, 0x2641FEAA, string);
Fishes[playerid] += 7;
IsFishing[playerid] = 0;
FishWeight[playerid] += weight;
TogglePlayerControllable(playerid,true);
return 1;
}
else if(rand == 7)
{
format(string, sizeof(string), "You just caught in your net a money backpack with $%d in it.", money);
SendClientMessage(playerid, 0x2641FEAA, string);
GivePlayerMoney(playerid, money);
IsFishing[playerid] = 0;
TogglePlayerControllable(playerid,true);
return 1;
}
}
return 0;
}