CMD:tune(playerid,params[])
{
{
if(isnull(params))
{
SendClientMessage(playerid, red, " Usage: /tune [1-4] ");
SendClientMessage(playerid, red, " FUNCTION: To Teleport To The Tune Garages ");
return 1;
}
if(strcmp(params,"1",true) == 0)
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) //They are driving a vehicle
{
SetVehiclePos(GetPlayerVehicleID(playerid), -1935.985, 231.728, 34.1546);
}
else //They are on-foot or a passenger
{
SetPlayerPos(playerid, -1935.985, 231.728, 34.1546);
new msg[999];
new dsname[MAX_PLAYER_NAME];
new string[999];
format(string, sizeof(string), "%s has just teleported to Tune 1 /Tune 1", dsname);
SendClientMessageToAll(COLOR_YELLOW, string);
format(string, sizeof(string), "~B~Welcome To ~r~Tune 1");
GameTextForPlayer(playerid, string, 3000, 4);
}
}
else if(strcmp(params,"2",true) == 0)
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) //They are driving a vehicle
{
SetVehiclePos(GetPlayerVehicleID(playerid), -2709.731, 217.423, 4.179);
}
else //They are on-foot or a passenger
{
SetPlayerPos(playerid, -2709.731, 217.423, 4.179);
new msg[128];
new dsname[MAX_PLAYER_NAME];
new string[128];
format(string, sizeof(string), "%us has just teleported to Tune 2 /Tune 2", dsname);
SendClientMessageToAll(yellow, msg);
format(string, sizeof(string), "~B~Welcome To ~r~Tune 2");
GameTextForPlayer(playerid, string, 3000, 4);
}
}
else if(strcmp(params,"3",true) == 0)
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) //They are driving a vehicle
{
SetVehiclePos(GetPlayerVehicleID(playerid), 2386.802, 1036.320, 10.280);
}
else //They are on-foot or a passenger
{
SetPlayerPos(playerid, 2386.802, 1036.320, 10.280);
new msg[128];
new dsname[MAX_PLAYER_NAME];
new string[128];
format(string, sizeof(string), "%us has just teleported to Tune 3 /Tune 3", dsname);
SendClientMessageToAll(yellow, msg);
format(string, sizeof(string), "~B~Welcome To ~r~Tune 3");
GameTextForPlayer(playerid, string, 3000, 4);
}
}
else if(strcmp(params,"4",true) == 0)
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) //They are driving a vehicle
{
SetVehiclePos(GetPlayerVehicleID(playerid), 2644.976, -2030.903, 13.554);
}
else //They are on-foot or a passenger
{
SetPlayerPos(playerid, 2644.976, -2030.903, 13.554);
new msg[128];
new dsname[MAX_PLAYER_NAME];
new string[128];
format(string, sizeof(string), "%us has just teleported to Tune 4 /Tune 4", dsname);
SendClientMessageToAll(yellow, msg);
format(string, sizeof(string), "~B~Welcome To ~r~Tune 4");
GameTextForPlayer(playerid, string, 3000, 4);
}
}
}
return 1;
}
CMD:tune(playerid, params[])
{
if(isnull(params))
{
SendClientMessage(playerid, COLOR_GREY, "[USAGE]: /tune [1-4]");
}
if(strval(params) == 1)
{
new vehicleid = GetPlayerVehicleID(playerid);
new State = GetPlayerState(playerid);
new string[128];
if(IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)
{
format(string, sizeof(string), "%s [ID:%d] has gone to Tuning 1 (/tune 1)", GetName(playerid), playerid);
SendClientMessageToAll(COLOR_YELLOW, string);
GameTextForPlayer(playerid, "~w~ Welcome To Tuning 1! ~G~", 5000, 5);
return SetVehiclePos(vehicleid, -1935.9851, 231.7287, 34.1563);
}
format(string, sizeof(string), "%s [ID:%d] has gone to Tuning 1 (/tune 1)", GetName(playerid), playerid);
SendClientMessageToAll(COLOR_YELLOW, string);
GameTextForPlayer(playerid, "~w~ Welcome To Tuning 1! ~G~", 5000, 5);
SetPlayerPos(playerid, -1935.9851, 231.7287, 34.1563);
}
if(strval(params) == 2)
{
new vehicleid = GetPlayerVehicleID(playerid);
new State = GetPlayerState(playerid);
new string[128];
if(IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)
{
format(string, sizeof(string), "%s [ID:%d] has gone to Tuning 2 (/tune 2)", GetName(playerid), playerid);
SendClientMessageToAll(COLOR_YELLOW, string);
GameTextForPlayer(playerid, "~w~ Welcome to Tuning 2! ~G~", 5000, 5);
return SetVehiclePos(vehicleid, -2709.7312, 217.4238, 4.1797);
}
format(string, sizeof(string), "%s [ID:%d] has gone to Tuning 2 (/tune 2)", GetName(playerid), playerid);
SendClientMessageToAll(COLOR_YELLOW, string);
GameTextForPlayer(playerid, "~w~ Welcome to Tuning 2! ~G~", 5000, 5);
SetPlayerPos(playerid, -2709.7312, 217.4238, 4.1797);
}
if(strval(params) == 3)
{
new vehicleid = GetPlayerVehicleID(playerid);
new State = GetPlayerState(playerid);
new string[128];
if(IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)
{
format(string, sizeof(string), "%s [ID:%d] has gone To Tuning 3 (/tune 3)", GetName(playerid), playerid);
SendClientMessageToAll(COLOR_YELLOW, string);
GameTextForPlayer(playerid, "~w~ Welcome To Tuning 3! ~G~", 5000, 5);
return SetVehiclePos(vehicleid, 2386.8020, 1036.3203, 10.8203);
}
format(string, sizeof(string), "%s [ID:%d] has gone to Tuning 3 (/tune 3)", GetName(playerid), playerid);
SendClientMessageToAll(COLOR_YELLOW, string);
GameTextForPlayer(playerid, "~w~ Welcome To Tuning 3! ~G~", 5000, 5);
SetPlayerPos(playerid, 2386.8020, 1036.3203, 10.8203);
}
if(strval(params) == 4)
{
new vehicleid = GetPlayerVehicleID(playerid);
new State = GetPlayerState(playerid);
new string[128];
if(IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)
{
format(string, sizeof(string), "%s [ID:%d] has gone to Tuning 4 (/tune 4)", GetName(playerid), playerid);
SendClientMessageToAll(COLOR_YELLOW, string);
GameTextForPlayer(playerid, "~w~ Welcome To Tuning 4! ~G~", 5000, 5);
return SetVehiclePos(vehicleid, 2644.9768, -2030.9032, 13.5540);
}
format(string, sizeof(string), "%s [ID:%d] has gone to Tuning 4 (/tune 4)", GetName(playerid), playerid);
SendClientMessageToAll(COLOR_YELLOW, string);
GameTextForPlayer(playerid, "~w~ Welcome To Tuning 4! ~G~", 5000, 5);
SetPlayerPos(playerid, 2644.9768, -2030.9032, 13.5540);
}
return 1;
}
stock GetName(playerid)
{
new Name[MAX_PLAYER_NAME];
if(IsPlayerConnected(playerid))
{
GetPlayerName(playerid, Name, sizeof(Name));
}
return Name;
}
CMD:tune(playerid, params[])
{
if(isnull(params))
{
SendClientMessage(playerid, red, " Usage: /tune [1-4] ");
SendClientMessage(playerid, red, " FUNCTION: To Teleport To The Tune Garages ");
return 1;
}
else
{
switch(strval(params))
{
case 1:
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
SetVehiclePos(GetPlayerVehicleID(playerid), -1935.985, 231.728, 34.1546);
}
else
{
SetPlayerPos(playerid, -1935.985, 231.728, 34.1546);
}
new msg[999];
new dsname[MAX_PLAYER_NAME];
new string[100];
format(string, sizeof(string), "%s has just teleported to Tune 1 /Tune 1", dsname);
SendClientMessageToAll(COLOR_YELLOW, string);
GameTextForPlayer(playerid, "~B~Welcome To ~r~Tune 1", 3000, 4);
return 1;
}
case 2:
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
SetVehiclePos(GetPlayerVehicleID(playerid), -2709.731, 217.423, 4.179);
}
else
{
SetPlayerPos(playerid, -2709.731, 217.423, 4.179);
}
new msg[999];
new dsname[MAX_PLAYER_NAME];
new string[100];
format(string, sizeof(string), "%s has just teleported to Tune 2 /Tune 2", dsname);
SendClientMessageToAll(COLOR_YELLOW, string);
GameTextForPlayer(playerid, "~B~Welcome To ~r~Tune 2", 3000, 4);
return 1;
}
case 3:
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
SetVehiclePos(GetPlayerVehicleID(playerid), 2386.802, 1036.320, 10.280);
}
else
{
SetPlayerPos(playerid, 2386.802, 1036.320, 10.280);
}
new msg[999];
new dsname[MAX_PLAYER_NAME];
new string[100];
format(string, sizeof(string), "%s has just teleported to Tune 1 /Tune 3", dsname);
SendClientMessageToAll(COLOR_YELLOW, string);
GameTextForPlayer(playerid, "~B~Welcome To ~r~Tune 3", 3000, 4);
return 1;
}
case 4:
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
SetVehiclePos(GetPlayerVehicleID(playerid), 2644.976, -2030.903, 13.554);
}
else
{
SetPlayerPos(playerid, 2644.976, -2030.903, 13.554);
}
new msg[999];
new dsname[MAX_PLAYER_NAME];
new string[100];
format(string, sizeof(string), "%s has just teleported to Tune 1 /Tune 4", dsname);
SendClientMessageToAll(COLOR_YELLOW, string);
GameTextForPlayer(playerid, "~B~Welcome To ~r~Tune 4", 3000, 4);
return 1;
}
}
}
return 1;
}
#define COLOR_RED idofcolor
#define COLOR_YELLOW idofcolor ^ on top of your script, ****** the color ids.. and find the " new msg" and remove it. |
#define red 0xAA3333AA
do
not with big word coz you used red not RED pawn Код:
|
CMD:tune(playerid, params[])
{
if(isnull(params))
{
SendClientMessage(playerid, red, " Usage: /tune [1-4] ");
SendClientMessage(playerid, red, " FUNCTION: To Teleport To The Tune Garages ");
return 1;
}
else
{
new dsname[MAX_PLAYER_NAME];
GetPlayerName(playerid,dsname,sizeof(dsname));
switch(strval(params))
{
case 1:
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
SetVehiclePos(GetPlayerVehicleID(playerid), -1935.985, 231.728, 34.1546);
}
else
{
SetPlayerPos(playerid, -1935.985, 231.728, 34.1546);
}
new msg[999];
new string[100];
format(string, sizeof(string), "%s has just teleported to Tune 1 (/Tune 1)", dsname);
SendClientMessageToAll(COLOR_YELLOW, string);
GameTextForPlayer(playerid, "~B~Welcome To ~r~Tune 1", 3000, 4);
return 1;
}
case 2:
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
SetVehiclePos(GetPlayerVehicleID(playerid), -2709.731, 217.423, 4.179);
}
else
{
SetPlayerPos(playerid, -2709.731, 217.423, 4.179);
}
new msg[999];
new string[100];
format(string, sizeof(string), "%s has just teleported to Tune 2 (/Tune 2)", dsname);
SendClientMessageToAll(COLOR_YELLOW, string);
GameTextForPlayer(playerid, "~B~Welcome To ~r~Tune 2", 3000, 4);
return 1;
}
case 3:
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
SetVehiclePos(GetPlayerVehicleID(playerid), 2386.802, 1036.320, 10.280);
}
else
{
SetPlayerPos(playerid, 2386.802, 1036.320, 10.280);
}
new msg[999];
new string[100];
format(string, sizeof(string), "%s has just teleported to Tune 3 (/Tune 3)", dsname);
SendClientMessageToAll(COLOR_YELLOW, string);
GameTextForPlayer(playerid, "~B~Welcome To ~r~Tune 3", 3000, 4);
return 1;
}
case 4:
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
SetVehiclePos(GetPlayerVehicleID(playerid), 2644.976, -2030.903, 13.554);
}
else
{
SetPlayerPos(playerid, 2644.976, -2030.903, 13.554);
}
new msg[999];
new string[100];
format(string, sizeof(string), "%s has just teleported to Tune 4 (/Tune 4)", dsname);
SendClientMessageToAll(COLOR_YELLOW, string);
GameTextForPlayer(playerid, "~B~Welcome To ~r~Tune 4", 3000, 4);
return 1;
}
}
}
return 1;
}