Getting weapon name problem - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Getting weapon name problem (
/showthread.php?tid=495559)
Getting weapon name problem -
Slicebook - 17.02.2014
help!
if I have a weapon,does not order it then down his name.
should order his name so pl. előveszi a(z) m4-t. but does not order.. ( take out )
--------------------------elteszi a(z) m4-t. ( stow )
if I have two weapons, orders his name then.
queries this: pl. Valaki elteszi a(z) mp5-t йs előveszi a(z) Ak47-t. ( stow, take out)
Код:
new tolteny[MAX_PLAYERS];
new ohand[MAX_PLAYERS] = 0;
new hand[MAX_PLAYERS] = 0;
new CHT;
//CHT Timer
CHT = SetTimer("CheckHand", 1000, 1);
public CheckHand()
{
new string[256];
//new wn[32];
//new wno[32];
for(new p; p<MAX_PLAYERS; p++)
{
hand[p] = GetPlayerWeapon(p);
tolteny[p] = GetPlayerAmmo(p);
if(ohand[p] != hand[p])
{
if(tolteny[p] != 0)
{
if(hand[p] == 0)
{
format(string,sizeof(string),"* Valaki elteszi a(z) %s-t.", GetWeaponNames(ohand[p])); <<<< does not order it = not work
ProxDetector(30.0, p, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
else if(ohand[p] == 0)
{
format(string,sizeof(string),"* Valaki előveszi a(z) %s-t.", GetWeaponNames(hand[p])); <<<<<< does not order it = not work
ProxDetector(30.0, p, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
else
{
format(string,sizeof(string),"* Valaki elteszi a(z) %s-t йs előveszi a(z) %s-t. ", <<<< queries the name = work
GetWeaponNames(ohand[p]),GetWeaponNames(hand[p]));
ProxDetector(30.0, p, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
ohand[p] = hand[p];
}
}
}
return 1;
}
gamemodes\rpmode.pwn(40917) : warning 204: symbol is assigned a value that is never used: "CHT" << may he be because of this?