26.05.2014, 07:28
Try This One :
PHP код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/WPACK1", true))
{
if(GetPlayerMoney(playerid) <100000) return SendClientMessage(playerid, 0xFF0000FF,"YOU DONT HAVE ENOUGH MONEY GO AND EARN SOME!!!");
GivePlayerMoney(playerid, -100000);
GivePlayerWeapon(playerid, 361, 5000);
GivePlayerWeapon(playerid, 22, 1000);
GivePlayerWeapon(playerid, 17, 50);
GivePlayerWeapon(playerid, 25, 790);
GivePlayerWeapon(playerid, 28, 2000);
GivePlayerWeapon(playerid, 30, 3000);
GivePlayerWeapon(playerid, 33, 550);
SendClientMessage(playerid, 0xFF0000FF, "SERVER:YOU HAVE BOUGHT WEAPON PACK 1!!!");
return 1;
}
if(!strcmp(cmdtext, "/WPACK2", true))
{
if(GetPlayerMoney(playerid) <150000) return SendClientMessage(playerid, 0xFF0000FF,"YOU DONT HAVE ENOUGH MONEY GO AND EARN SOME!!!");
GivePlayerMoney(playerid, -150000);
GivePlayerWeapon(playerid, 363, 5000);
GivePlayerWeapon(playerid, 23, 1000);
GivePlayerWeapon(playerid, 18, 50);
GivePlayerWeapon(playerid, 26, 790);
GivePlayerWeapon(playerid, 32, 2000);
GivePlayerWeapon(playerid, 31, 3000);
GivePlayerWeapon(playerid, 34, 550);
SendClientMessage(playerid, 0xFF0000FF, "SERVER:YOU HAVE BOUGHT WEAPON PACK 2!!!");
return 1;
}
if(!strcmp(cmdtext, "/WPACK3", true))
{
if(GetPlayerMoney(playerid) <250000) return SendClientMessage(playerid, 0xFF0000FF,"YOU DONT HAVE ENOUGH MONEY GO AND EARN SOME!!!");
GivePlayerMoney(playerid, -250000);
GivePlayerWeapon(playerid, 359, 5000);
GivePlayerWeapon(playerid, 24, 1000);
GivePlayerWeapon(playerid, 16, 50);
GivePlayerWeapon(playerid, 27, 790);
GivePlayerWeapon(playerid, 29, 2000);
GivePlayerWeapon(playerid, 31, 3000);
GivePlayerWeapon(playerid, 34, 550);
SendClientMessage(playerid, 0xFF0000FF, "SERVER:YOU HAVE BOUGHT WEAPON PACK 3!!!");
return 1;
}
if (strcmp("/kill", cmdtext, true, 10) == 0)
{
SetPlayerHealth(playerid, 0);
SendClientMessage(playerid, 0xFF0000FF, "YOU HAVE KILLED YOURSELVES!!!");
return 1;
}
if (strcmp("/heal", cmdtext, true, 10) == 0)
{
SetPlayerHealth(playerid, 100.0);
SendClientMessage(playerid, 0xFF0000FF, "YOU HAVE BEEN HEALED!!!");
return 1;
}
if (!strcmp("/repair", cmdtext))
{
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0x00FF000F, "You are not in a vehicle!");
RepairVehicle(GetPlayerVehicleID(playerid));
PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
SendClientMessage(playerid, 0x00FF000F, "Your vehicle has been repaired!");
return 1;
}
if (strcmp("/armour", cmdtext, true, 10) == 0)
{
SetPlayerArmour(playerid, 100);
SendClientMessage(playerid, 0xFF0000FF, "YOU HAVE COMMANDED ARMOUR!!!");
return 1;
}
if (strcmp("/radio", cmdtext, true) == 0)
{
GameTextForPlayer(playerid,"~r~THERE ~b~ARE ~p~RADIO1 - ~r~~h~~h~~h~~h~10",2600,3);
PlayAudioStreamForPlayer(playerid, "http://www.woo55.pk/adata/7720/Ne-Yo%20feat.%20Akon%20-%20Play%20Hard%20%28Prod.%20by%20David%20Guetta%29%20%28New%20Version%29%20%28www.SongsLover.pk%29.mp3");
return 1;
}
if (strcmp("/radio1", cmdtext, true) == 0)
{
PlayAudioStreamForPlayer(playerid, "http://www.woo55.pk/adata/8416/03.%20This%20Is%20Love%20%28Feat%20Eva%20Simons%29%20%28www.SongsLover.pk%29.mp3");
return 1;
}
if (strcmp("/radio2", cmdtext, true) == 0)
{
PlayAudioStreamForPlayer(playerid, "http://www.woo55.pk/adata/8417/04.%20Scream%20%20Shout%20%28Feat%20Britney%20Spears%29%20%28www.SongsLover.pk%29.mp3");
return 1;
}
if (strcmp("/radio3", cmdtext, true) == 0)
{
PlayAudioStreamForPlayer(playerid, "http://www.woo55.pk/adata/10968/13%20-%20Now%20That%20I%20Found%20You%20-%20%28www.SongsLover.com%29.mp3");
return 1;
}
if (strcmp("/radio4", cmdtext, true) == 0)
{
PlayAudioStreamForPlayer(playerid, "http://www.woo55.pk/adata/5529/PSY%20-%20Gangnam%20Style%20%28www.SongsLover.pk%29.mp3");
return 1;
}
if (strcmp("/radio5", cmdtext, true) == 0)
{
PlayAudioStreamForPlayer(playerid, "http://www.woo55.pk/adata/5165/Taylor%20Swift%20-%20I%20Knew%20You%20Were%20Trouble%20%28www.SongsLover.pk%29..mp3");
return 1;
}
if (strcmp("/radio6", cmdtext, true) == 0)
{
PlayAudioStreamForPlayer(playerid, "http://www.woo55.com/adata/8635/12.%20Titanium%20(Ft.%20Sia)%20(www.SongsLover.com).mp3");
return 1;
}
if (strcmp("/radio7", cmdtext, true) == 0)
{
PlayAudioStreamForPlayer(playerid, "http://www.woo55.com/adata/8625/02.%20Little%20Bad%20Girl%20(Ft.%20Taio%20Cruz%20And%20Ludacris)%20(www.SongsLover.com).mp3");
return 1;
}
if (strcmp("/radio8", cmdtext, true) == 0)
{
PlayAudioStreamForPlayer(playerid, "http://www.woo55.pk/adata/4463/08.%20Just%20One%20Last%20Time%20(Feat%20Taped%20Rai)%20(www.SongsLover.pk).mp3");
return 1;
}
if (strcmp("/radio9", cmdtext, true) == 0)
{
PlayAudioStreamForPlayer(playerid, "http://www.woo55.pk/adata/4462/07.%20Wild%20One%20Two%20(Jack%20Back%20Feat%20David%20Guetta,%20Nicky%20Romero%20%20Sia)%20(www.SongsLover.pk).mp3");
return 1;
}
if (strcmp("/radio10", cmdtext, true) == 0)
{
PlayAudioStreamForPlayer(playerid, "http://www.woo55.com/adata/10081/02.%20Sorry%20For%20Party%20Rocking%20(www.SongsLover.com).mp3");
return 1;
}
if (strcmp("/Rstop", cmdtext, true) == 0)
{
GameTextForPlayer(playerid,"STOPPED",2500,4);
StopAudioStreamForPlayer(playerid,"RADIO STOPPED");
return 1;
}
if (strcmp("/BOMB", cmdtext, true) == 0)
{
new Float:px, Float:py, Float:pz;
GetPlayerPos(playerid, px, py, pz);
CreateObject(1225, px, py, pz, 0.0, 0.0, 0.0, 300.0);
return 1;
}
return 0;
}