17.03.2012, 19:33
hey how can a Clearchat after i type done again. its my tutorial?...
PHP код:
CMD:done(playerid, params[])
{
switch(TutStep[playerid])
{
case 1:
{
HideTutGUIFrame(playerid, 1);
ShowTutGUIFrame(playerid, 2);
TutStep[playerid] = 2;
// how to make monet
SendClientMessageEx(playerid, COLOR_RED, "How to make money:");
SendClientMessageEx(playerid, COLOR_YELLOW, "There are many jobs located around San Andreas, these are represented");
SendClientMessageEx(playerid, COLOR_YELLOW, "by ~y~yellow~w~ information icons.");
SendClientMessageEx(playerid, COLOR_YELLOW, "You can ~g~/withdraw~w~ and ~g~/deposit~w~ money at the bank.");
SendClientMessageEx(playerid, COLOR_YELLOW, "You can ~g~/atmwithdraw~w~ and ~g~/atmdeposit~w~ cash at a ATM for a small fee.");
SendClientMessageEx(playerid, COLOR_YELLOW, "You can ~g~/fish~w~ in boats or at the pier for money.");
SendClientMessageEx(playerid, COLOR_YELLOW, "You can ~g~/guard~w~ people for money.");
SendClientMessageEx(playerid, COLOR_YELLOW, "You can ~g~/sellgun~w~ to people for money.");
SendClientMessageEx(playerid, COLOR_YELLOW, "You can ~g~/sellpot~w~ or ~g~/sellcrack~w~ to people for money.");
SendClientMessageEx(playerid, COLOR_RED, "NOW TYPE /DONE");
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
Streamer_UpdateEx(playerid, 1457.4854,-1011.5267,26.8438);
SetPlayerPos(playerid, 1457.4854,-1011.5267,-10.0);
SetPlayerCameraPos(playerid, 1457.5421,-1039.4404,28.4274);
SetPlayerCameraLookAt(playerid, 1457.4854,-1011.5267,26.8438);
}
case 2:
{
ShowTutGUIFrame(playerid, 3);
TutStep[playerid] = 3;
SendClientMessageEx(playerid, COLOR_RED, "Tutorial - Law Enforcement");
SendClientMessageEx(playerid, COLOR_YELLOW, "There are currently 4 ~b~Law Enforcement~w~ Factions. LSPD, SFPD, SASD and FBI.");
SendClientMessageEx(playerid, COLOR_YELLOW, "If you cause trouble and break local laws, you may be arrested by one of");
SendClientMessageEx(playerid, COLOR_YELLOW, "them. If you're wanting to become a part of these factions, apply on our");
SendClientMessageEx(playerid, COLOR_YELLOW, "forums at TSW-TheSocialWorld.tk");
SendClientMessageEx(playerid, COLOR_YELLOW, "LSPD(Los Santos Police Department)");
SendClientMessageEx(playerid, COLOR_YELLOW, "SFPD(San Fierro Police Department)");
SendClientMessageEx(playerid, COLOR_YELLOW, "SASD(San Andreas Sheriffs Department)");
SendClientMessageEx(playerid, COLOR_YELLOW, "FBI(Federal Bureau of Investigation)");
SendClientMessageEx(playerid, COLOR_RED, "NOW TYPE /DONE");
// Los Santos ATM (Camera)
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
Streamer_UpdateEx(playerid, 2140.5173,-1163.9576,23.9922);
SetPlayerPos(playerid, 1607.0160,-1510.8218,-10.0);
SetPlayerCameraPos(playerid, 1850.1813,-1765.7552,81.9271);
SetPlayerCameraLookAt(playerid, 1607.0160,-1510.8218,207.4438);
}
case 3:
{
ShowTutGUIFrame(playerid, 4);
TutStep[playerid] = 4;
// Fishing Pier (Camera)
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
Streamer_UpdateEx(playerid, 370.0804,-2087.8767,7.8359);
SetPlayerPos(playerid, 370.0804,-2087.8767,-10.0);
SetPlayerCameraPos(playerid, 423.3802,-2067.7915,29.8605);
SetPlayerCameraLookAt(playerid, 370.0804,-2087.8767,7.8359);
}
case 4:
{
ShowTutGUIFrame(playerid, 5);
TutStep[playerid] = 5;
// Ganton Gym (Camera)
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
Streamer_UpdateEx(playerid, 2229.4968,-1722.0701,13.5625);
SetPlayerPos(playerid, 2229.4968,-1722.0701,-10.0);
SetPlayerCameraPos(playerid, 2211.1460,-1748.3909,29.3744);
SetPlayerCameraLookAt(playerid, 2229.4968,-1722.0701,13.5625);
}
case 5:
{
ShowTutGUIFrame(playerid, 6);
TutStep[playerid] = 6;
// Arms Dealer (Camera)
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
Streamer_UpdateEx(playerid, 1366.1187,-1275.1248,13.5469);
SetPlayerPos(playerid, 1366.1187,-1275.1248,-10.0);
SetPlayerCameraPos(playerid, 1341.2936,-1294.8105,23.3096);
SetPlayerCameraLookAt(playerid, 1366.1187,-1275.1248,13.5469);
}
case 6:
{
ShowTutGUIFrame(playerid, 7);
TutStep[playerid] = 7;
// Drugs Dealer (Camera)
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
Streamer_UpdateEx(playerid, 2167.5542,-1673.1503,15.0812);
SetPlayerPos(playerid, 2167.5542,-1673.1503,-10.0);
SetPlayerCameraPos(playerid, 2186.2607,-1693.4254,29.5406);
SetPlayerCameraLookAt(playerid, 2167.5542,-1673.1503,15.0812);
}
case 7:
{
ShowTutGUIFrame(playerid, 8);
TutStep[playerid] = 8;
// Drugs Smuggler (Camera)
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
Streamer_UpdateEx(playerid, 59.9634,-283.6652,1.5781);
SetPlayerPos(playerid, 59.9634,-283.6652,-10.0);
SetPlayerCameraPos(playerid, 96.4630,-216.5790,34.2965);
SetPlayerCameraLookAt(playerid, 59.9634,-283.6652,1.5781);
}
case 8:
{
ShowTutGUIFrame(playerid, 9);
TutStep[playerid] = 9;
}
case 9:
{
for(new f = 2; f < 10; f++)
{
HideTutGUIFrame(playerid, f);
}
ShowTutGUIFrame(playerid, 10);
TutStep[playerid] = 10;
// LSPD (Camera)
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
Streamer_UpdateEx(playerid, 1554.3381,-1675.5692,16.1953);
SetPlayerPos(playerid, 1554.3381,-1675.5692,-10.0);
SetPlayerCameraPos(playerid, 1514.7783,-1700.2913,36.7506);
SetPlayerCameraLookAt(playerid, 1554.3381,-1675.5692,16.1953);
}
case 10:
{
HideTutGUIFrame(playerid, 10);
ShowTutGUIFrame(playerid, 11);
TutStep[playerid] = 11;
// All Saints (Camera)
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
Streamer_UpdateEx(playerid,1175.5581,-1324.7922,18.1610);
SetPlayerPos(playerid, 1188.4574,-1309.2242,-10.0);
SetPlayerCameraPos(playerid,1188.4574,-1309.2242,13.5625+6.0);
SetPlayerCameraLookAt(playerid,1175.5581,-1324.7922,18.1610);
}
case 11:
{
HideTutGUIFrame(playerid, 11);
ShowTutGUIFrame(playerid, 12);
TutStep[playerid] = 12;
// San Andreas News (Camera)
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
Streamer_UpdateEx(playerid,643.6738,-1348.9811,17.7879);
SetPlayerPos(playerid, 643.6738,-1348.9811,-10.0);
SetPlayerCameraPos(playerid,616.4327,-1336.6818,20.9202);
SetPlayerCameraLookAt(playerid,643.6738,-1348.9811,17.7879);
}
case 12:
{
HideTutGUIFrame(playerid, 12);
ShowTutGUIFrame(playerid, 13);
TutStep[playerid] = 13;
// Government (Camera)
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
Streamer_UpdateEx(playerid,1478.4708,-1754.7579,16.7400);
SetPlayerPos(playerid, 1478.4708,-1754.7579,-10.0);
SetPlayerCameraPos(playerid,1520.2188,-1712.0742,40.5350);
SetPlayerCameraLookAt(playerid,1478.4708,-1754.7579,16.7400);
}
case 13:
{
HideTutGUIFrame(playerid, 13);
ShowTutGUIFrame(playerid, 14);
TutStep[playerid] = 14;
// TR (Camera)
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
Streamer_UpdateEx(playerid,-2679.5342,1639.0643,65.8865);
SetPlayerPos(playerid, -2679.5342,1639.0643,-10.0);
SetPlayerCameraPos(playerid,-2734.3477,1520.4971,87.1810);
SetPlayerCameraLookAt(playerid,-2679.5342,1639.0643,65.8865);
}
case 14:
{
HideTutGUIFrame(playerid, 14);
ShowTutGUIFrame(playerid, 15);
TutStep[playerid] = 15;
// Gang SaC Beach (Camera)
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
Streamer_UpdateEx(playerid,655.5394,-1867.2231,5.4609);
SetPlayerPos(playerid, 655.5394,-1867.2231,-10.0);
SetPlayerCameraPos(playerid,699.7435,-1936.7568,24.8646);
SetPlayerCameraLookAt(playerid,655.5394,-1867.2231,5.4609);
}
case 15:
{
HideTutGUIFrame(playerid, 15);
ShowTutGUIFrame(playerid, 16);
TutStep[playerid] = 16;
// 24/7 Store (Camera)
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
Streamer_UpdateEx(playerid,1315.6570,-898.7749,39.5781);
SetPlayerPos(playerid, 1315.6570,-898.7749,-10.0);
SetPlayerCameraPos(playerid,1315.4285,-922.5234,44.0355);
SetPlayerCameraLookAt(playerid,1315.6570,-898.7749,39.5781);
}
case 16:
{
HideTutGUIFrame(playerid, 16);
ShowTutGUIFrame(playerid, 17);
TutStep[playerid] = 17;
// Clothing Store (Camera)
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
Streamer_UpdateEx(playerid,1457.1664,-1138.0111,26.6261);
SetPlayerPos(playerid, 1457.1664,-1138.0111,-10.0);
SetPlayerCameraPos(playerid,1459.0411,-1156.4342,33.4464);
SetPlayerCameraLookAt(playerid,1457.1664,-1138.0111,26.6261);
}
case 17:
{
HideTutGUIFrame(playerid, 17);
ShowTutGUIFrame(playerid, 18);
TutStep[playerid] = 18;
// Car Dealership (Camera)
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
Streamer_UpdateEx(playerid,1656.6107,-1892.3878,13.5521);
SetPlayerPos(playerid,1656.6107,-1892.3878,-10.0);
SetPlayerCameraPos(playerid,1678.1699,-1863.5964,22.9622);
SetPlayerCameraLookAt(playerid,1656.6107,-1892.3878,13.5521);
}
case 18:
{
HideTutGUIFrame(playerid, 18);
ShowTutGUIFrame(playerid, 19);
TutStep[playerid] = 19;
// Los Santos (Camera)
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
Streamer_UpdateEx(playerid,1607.0160,-1510.8218,207.4438);
SetPlayerPos(playerid,1607.0160,-1510.8218,-10.0);
SetPlayerCameraPos(playerid,1850.1813,-1765.7552,81.9271);
SetPlayerCameraLookAt(playerid,1607.0160,-1510.8218,207.4438);
}
case 19:
{
HideTutGUIFrame(playerid, 19);
ShowTutGUIFrame(playerid, 20);
TutStep[playerid] = 20;
// VIP (Camera)
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
Streamer_UpdateEx(playerid,1797.3397,-1578.3440,14.0798);
SetPlayerPos(playerid,1797.3397,-1578.3440,-10.0);
SetPlayerCameraPos(playerid,1832.1698,-1600.1538,32.2877);
SetPlayerCameraLookAt(playerid,1797.3397,-1578.3440,14.0798);
}
case 20:
{
HideTutGUIFrame(playerid, 20);
ShowTutGUIFrame(playerid, 21);
TutStep[playerid] = 21;
// Unity Station (Camera)
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
Streamer_UpdateEx(playerid,1716.1129,-1880.0715,22.0264);
SetPlayerPos(playerid,1716.1129,-1880.0715,-10.0);
SetPlayerCameraPos(playerid,1755.0413,-1824.8710,20.2100);
SetPlayerCameraLookAt(playerid,1716.1129,-1880.0715,22.0264);
}
case 21:
{
HideTutGUIFrame(playerid, 21);
ShowTutGUIFrame(playerid, 22);
TutStep[playerid] = 22;
// Unity Station (Camera)
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
Streamer_UpdateEx(playerid,1716.1129,-1880.0715,22.0264);
SetPlayerPos(playerid,1716.1129,-1880.0715,-10.0);
SetPlayerCameraPos(playerid,1755.0413,-1824.8710,20.2100);
SetPlayerCameraLookAt(playerid,1716.1129,-1880.0715,22.0264);
}
case 22:
{
HideTutGUIFrame(playerid, 22);
ShowTutGUIFrame(playerid, 23);
TutStep[playerid] = 23;
// Unity Station (Camera)
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
Streamer_UpdateEx(playerid,1716.1129,-1880.0715,22.0264);
SetPlayerPos(playerid,1716.1129,-1880.0715,-10.0);
SetPlayerCameraPos(playerid,1755.0413,-1824.8710,20.2100);
SetPlayerCameraLookAt(playerid,1716.1129,-1880.0715,22.0264);
}
case 23:
{
TutStep[playerid] = 24;
PlayerInfo[playerid][pTut] = 1;
gOoc[playerid] = 0; gNews[playerid] = 0; gFam[playerid] = 0;
ClearChatbox(playerid);
TogglePlayerControllable(playerid, 1);
SetCamBack(playerid);
DeletePVar(playerid, "MedicBill");
SetPlayerColor(playerid,TEAM_HIT_COLOR);
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid, 1715.1201,-1903.1711,13.5665);
SetPlayerFacingAngle(playerid, 359.4621);
SetCameraBehindPlayer(playerid);
SetPlayerVirtualWorld(playerid, 0);
}
}
return 1;
}