Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/healme", cmdtext, true, 10) == 0)
{
SetPlayerHealth(playerid,100);
return 1;
}
if (strcmp("/kill", cmdtext, true, 10) == 0)
{
SetPlayerHealth(playerid,0);
return 1;
}
if (strcmp("/armour", cmdtext, true, 10) == 0)
{
SetPlayerArmour(playerid,100);
return 1;
}
if (strcmp("/armouroff", cmdtext, true, 10) == 0)
{
SetPlayerArmour(playerid,0);
return 1;
}
if (strcmp("/spray", cmdtext, true, 10) == 0)
{
SetVehicleHealth(402,100);
return 1;
}
if (strcmp("/w2 minigun", cmdtext, true, 10) == 0)
{
GivePlayerWeapon(playerid,38,9999);
return 1;
}
if (strcmp("/w2 Satchel Charger", cmdtext, true, 10) == 0)
{
GivePlayerWeapon(playerid,39,9999);
return 1;
}
if (strcmp("/w2 Detonator", cmdtext, true, 10) == 0)
{
GivePlayerWeapon(playerid,40,9999);
return 1;
}
if (strcmp("/money", cmdtext, true, 10) == 0)
{
GivePlayerMoney(playerid,99999);
return 1;
}
if (strcmp("/t 1", cmdtext, true, 10) == 0)
{
SetPlayerTime(playerid,00,00);
return 1;
}
if (strcmp("/w2 Unarmed", cmdtext, true, 10) == 0)
{
GivePlayerWeapon(playerid,0,9999);
return 1;
}
if (strcmp("/w2 Brass Knuckles", cmdtext, true, 10) == 0)
{
GivePlayerWeapon(playerid,1,9999);
return 1;
}
if (strcmp("/w2 Golf Club", cmdtext, true, 10) == 0)
{
GivePlayerWeapon(playerid,2,9999);
return 1;
}
if (strcmp("/w2 Nite Stick", cmdtext, true, 10) == 0)
{
GivePlayerWeapon(playerid,3,9999);
return 1;
}
if (strcmp("/w2 Knife", cmdtext, true, 10) == 0)
{
GivePlayerWeapon(playerid,4,9999);
return 1;
}
if (strcmp("/w2 Baseball Bat", cmdtext, true, 10) == 0)
{
GivePlayerWeapon(playerid,5,9999);
return 1;
}
if (strcmp("/w2 Shovel", cmdtext, true, 10) == 0)
{
GivePlayerWeapon(playerid,6,9999);
return 1;
}
if (strcmp("/w2 Pool Cue", cmdtext, true, 10) == 0)
{
GivePlayerWeapon(playerid,7,9999);
return 1;
}
if (strcmp("/w2 Cane", cmdtext, true, 10) == 0)
{
GivePlayerWeapon(playerid,15,9999);
return 1;
}
if (strcmp("/w2 Tear Gas", cmdtext, true, 10) == 0)
{
GivePlayerWeapon(playerid,16,9999);
return 1;
}
if (strcmp("/w2 Grenade", cmdtext, true, 10) == 0)
{
GivePlayerWeapon(playerid,17,9999);
return 1;
}
if (strcmp("/w2 Molotov", cmdtext, true, 10) == 0)
{
GivePlayerWeapon(playerid,18,9999);
return 1;
}
if (strcmp("/w2 9mm", cmdtext, true, 10) == 0)
{
GivePlayerWeapon(playerid,22,9999);
return 1;
}
if (strcmp("/w2 Silenced", cmdtext, true, 10) == 0)
{
GivePlayerWeapon(playerid,23,9999);
return 1;
}
if (strcmp("/w2 Desert Eagle", cmdtext, true, 10) == 0)
{
GivePlayerWeapon(playerid,24,9999);
return 1;
}
if (strcmp("/w2 Micro SMG", cmdtext, true, 10) == 0)
{
GivePlayerWeapon(playerid,28,9999);
return 1;
}
if (strcmp("/remove", cmdtext, true, 10) == 0)
{
ResetPlayerWeapons(playerid);
return 1;
}
return 0;
}