15.05.2012, 17:40
SORRY FOR MY ENGLISH
Hello,i got a weapon script,it's ok,i made it to take money but,i want if someone can help me to make that:
If the player want to buy a gun and he don't have enought money send him a message like :
You don't have enought money!
Here is the script:
pawn Код:
#include <a_samp>
#define weapons 4670
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Weapon Spawner by FusiouS loaded ");
print(" Version: 1.0, Release 1");
print("--------------------------------------");
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (!strcmp(cmdtext, "/arme", true))
{
ShowPlayerDialog(playerid, weapons, DIALOG_STYLE_LIST, "Arme", "Cutit-500$\nBata de Baseball-100$\nDeagle-1000$\nShotgun-1500$\nShotgun de Lupta-2000$\nTec-9-1500$\nMP5-1500$\nAK-47-2500$\nSniper(Luneta)-3000$\nLansator(Agheu)-4000$\nGrenade-5000$\nCocktail Molotov-4000$\nM4A1-3000$", "Alege", "Cancel");
return 1;
}
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == weapons)
{
switch(listitem)
{
case 0:
{
GivePlayerWeapon(playerid, 4, 1);
GivePlayerMoney(playerid,-500);
}
case 1:
{
GivePlayerWeapon(playerid, 5, 1);
GivePlayerMoney(playerid,-100);
}
case 2:
{
GivePlayerWeapon(playerid, 24, 300);
GivePlayerMoney(playerid,-1000);
}
case 3:
{
GivePlayerWeapon(playerid, 25, 500);
GivePlayerMoney(playerid,-1500);
}
case 4:
{
GivePlayerWeapon(playerid, 27, 500);
GivePlayerMoney(playerid,-2000);
}
case 5:
{
GivePlayerWeapon(playerid, 32, 500);
GivePlayerMoney(playerid,-1500);
}
case 6:
{
GivePlayerWeapon(playerid, 29, 500);
GivePlayerMoney(playerid,-1500);
}
case 7:
{
GivePlayerWeapon(playerid, 30, 500);
GivePlayerMoney(playerid,-2500);
}
case 8:
{
GivePlayerWeapon(playerid, 34, 500);
GivePlayerMoney(playerid,-3000);
}
case 9:
{
GivePlayerWeapon(playerid, 36, 500);
GivePlayerMoney(playerid,-4000);
}
case 10:
{
GivePlayerWeapon(playerid, 16, 500);
GivePlayerMoney(playerid,-5000);
}
case 11:
{
GivePlayerWeapon(playerid, 18, 500);
GivePlayerMoney(playerid,-4000);
}
case 12:
{
GivePlayerWeapon(playerid, 31, 500);
GivePlayerMoney(playerid,-3000);
}
}
}
return 1;
}
I want when a player kills another player,i want when he do that he get 2.000$ and 1 point [when press tab and see player's scores]
Thanx.