07.04.2011, 14:53
i need help but only the people who already did this can help me...
did you ever make a:
1)stunt missin
2)moneybag mission
?
did you ever make a:
1)stunt missin
2)moneybag mission
?
i need help but only the people who already did this can help me...
did you ever make a: 1)stunt missin 2)moneybag mission ? |
Ok i'll help you, take a look at this !
|
i need help but only the people who already did this can help me...
did you ever make a: 1)stunt missin 2)moneybag mission ? |
#include <a_samp>
#include <streamer>//You need incognito's streamer
new Float:RandomCheckpoints[][3] =
{
{-104.9833,2483.1045,16.1085},//Random places for testing.
{38.0358,2455.4512,16.1051}, //Delete these and replace with your random locations
{258.0237,2492.8857,16.2115},
{286.0086,2532.1282,16.4443},
{301.5035,2561.1299,15.9924},
{403.6273,2572.5688,15.9922}
};
new IsMoneyHunting[MAX_PLAYERS];
new MoneyHuntCP;
forward Winner(playerid);
public OnFilterScriptInit()
{
MoneyHuntCP = CreateDynamicCP( x, y, z,3.0,-1,-1,-1,10.0);//Put cords where you want the start cp
return 1;
}
public OnPlayerConnect(playerid)
{
IsMoneyHunting[playerid] = 0;
return 1;
}
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
if(checkpointid == MoneyHuntCP)
{
if(!IsPlayerInAnyVehicle(playerid)) return GameTextForPlayer(playerid,"~y~]~g~you need a vehicle~y~]~n~~g~for the money hunt",3000,3);
{
GameTextForPlayer(playerid,"~y~]~g~money hunt~y~]~n~~g~type /start to enter",3000,3);
}
}
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/start", cmdtext, true, 10) == 0)
{
if(IsMoneyHunting[playerid] == 1) return GameTextForPlayer(playerid,"~r~your already doing the money hunt",3000,3);
{
GameTextForPlayer(playerid,"~g~moneyhunt started~n~get to the red marker",3000,3);
new randcheck = random(sizeof(RandomCheckpoints));
SetPlayerRaceCheckpoint(playerid,2,RandomCheckpoints[randcheck][0],RandomCheckpoints[randcheck][1],RandomCheckpoints[randcheck][2],0,0,0,6);
PlayerPlaySound(playerid, 1138, 0.0, 0.0, 10.0);
IsMoneyHunting[playerid] = 1;
return 1;
}
}
return 0;
}
public Winner(playerid)
{
new cash = random(20000);
GivePlayerMoney(playerid, cash);
new winname[MAX_PLAYER_NAME];
GetPlayerName(playerid,winname,sizeof(winname));
new wintxt[128];
format(wintxt,sizeof(wintxt),"[Challenge]%s Has Completed The Money Rush Challenge Winning $%d Cash",winname,cash);
SendClientMessageToAll(0x007200AA,wintxt);
new wintxt2[128];
format(wintxt2,sizeof(wintxt2),"~g~you won the challenge~n~~y~]~g~prize $%d~y~]",cash);
GameTextForPlayer(playerid,wintxt2,5000,3);
return 1;
}
public OnPlayerEnterRaceCheckpoint(playerid)
{
if(IsMoneyHunting[playerid] == 0) return 1;
{
Winner(playerid);
DisablePlayerRaceCheckpoint(playerid);
PlayerPlaySound(playerid, 1138, 0.0, 0.0, 10.0);
IsMoneyHunting[playerid] = 0;
}
return 1;
}