SA-MP Forums Archive
Weapon Shot Script Error. - 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: Weapon Shot Script Error. (/showthread.php?tid=592672)



Weapon Shot Script Error. - norton2 - 28.10.2015

When add this script in callback "OnPlayerWeaponShot" server closed.
Script:
Код HTML:
if(pInfo[playerid][pAdmin] < 1 && weaponid == 38 || weaponid == 36)
{
    new string[110];
    format(string,sizeof(string),"%s has been kicked for weapons cheats.", GetName(playerid));
    SendClientMessageToAll(COLOR_RED, string);
    Kick(playerid);
}
.LOG:
Код HTML:
[08:49:12] [debug] Server crashed due to an unknown error
[08:49:12] [debug] Native backtrace:
[08:49:12] [debug] #0 004853e1 in ?? () from samp-server.exe
[08:49:12] [debug] #1 6c266401 in ?? () from plugins\crashdetect.DLL
[08:49:12] [debug] #2 6c280a0c in ?? () from plugins\crashdetect.DLL
[08:49:12] [debug] #3 6c0e51c6 in ?? () from plugins\streamer.DLL
[08:49:12] [debug] #4 0046f3e3 in ?? () from samp-server.exe
[08:49:12] [debug] #5 00490020 in ?? () from samp-server.exe
[08:49:12] [debug] #6 00490032 in ?? () from samp-server.exe
[08:49:12] [debug] #7 6be81bd3 in ?? () from plugins\mysql.DLL
[08:49:12] [debug] #8 0048d4db in ?? () from samp-server.exe
[08:49:12] [debug] #9 5c8b01f8 in ?? () from samp-server.exe
[08:49:12] [debug] #10 61750824 in ?? () from samp-server.exe



Re: Weapon Shot Script Error. - ATGOggy - 28.10.2015

pawn Код:
if(pInfo[playerid][pAdmin] < 1 && weaponid == 38)
{
    new string[110];
    format(string,sizeof(string),"%s has been kicked for weapons cheats.", GetName(playerid));
    SendClientMessageToAll(COLOR_RED, string);
    Kick(playerid);
}
if(weaponid == 36)
{
    new string[110];
    format(string,sizeof(string),"%s has been kicked for weapons cheats.", GetName(playerid));
    SendClientMessageToAll(COLOR_RED, string);
    Kick(playerid);
}



Re: Weapon Shot Script Error. - AbyssMorgan - 28.10.2015

PHP код:
&& || c   //shit :(
&& (|| c//ok :) 
PHP код:
if(pInfo[playerid][pAdmin] < && (weaponid == 38 || weaponid == 36))
{
    new 
string[110];
    
format(string,sizeof(string),"%s has been kicked for weapons cheats."GetName(playerid));
    
SendClientMessageToAll(COLOR_REDstring);
    
Kick(playerid);




Re: Weapon Shot Script Error. - norton2 - 29.10.2015

Quote:
Originally Posted by AbyssMorgan
Посмотреть сообщение
PHP код:
&& || c   //shit :(
&& (|| c//ok :) 
PHP код:
if(pInfo[playerid][pAdmin] < && (weaponid == 38 || weaponid == 36))
{
    new 
string[110];
    
format(string,sizeof(string),"%s has been kicked for weapons cheats."GetName(playerid));
    
SendClientMessageToAll(COLOR_REDstring);
    
Kick(playerid);

Thank you very much! +1