zcmd 0.3e causes crash - 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: zcmd 0.3e causes crash (
/showthread.php?tid=353708)
zcmd 0.3e causes crash -
Johndaonee - 24.06.2012
Is it really zcmd causing these crashes? It happens right after using a zcmd command like this one, worked fine on 0.3d
pawn Код:
COMMAND:agivegun(playerid, params[])
{
printf("[ %s ] /agivegun",GetPlayerNameEx(playerid));
if(PlayerInfo[playerid][pAdministrator] >= 3)
{
new iPlayerID,
iWeapon,
iAmmo;
if(sscanf(params, "uii", iPlayerID, iWeapon, iAmmo))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /agivegun <PlayerID/PartOfName> <WeaponID> <Ammo>");
SendClientMessage(playerid, COLOR_WHITE, "3(Club) | 4(knife) | 5(bat) | 6(Shovel) | 7(Cue) | 8(Katana) | 10-13(Dildo) | 14(Flowers)");
SendClientMessage(playerid, COLOR_WHITE, "16(Grenades) | 18(Molotovs) | 22(Pistol) | 23(SPistol) 24(Eagle) | 25(Shotgun) | 27(SPAS12)");
SendClientMessage(playerid, COLOR_WHITE, "29(MP5) | 30(AK47) | 31(M4) | 33(Rifle) | 34(Sniper) | 35(Bazooka) | 37(Flamethrower)");
SendClientMessage(playerid, COLOR_WHITE, "41(Spray) | 42(Fire Extinguisher) | 43(Camera) | 46(Parachute)");
return 1;
}
if(!IsPlayerConnected(iPlayerID)) return SendErrorMessage(playerid, "ERROR: That playerid is not connected");
if(iWeapon < 1 || iWeapon > 46)
{
return SendErrorMessage(playerid, "WeaponID cannot be less than 1 or above 46");
}
if(iAmmo < 1 || iAmmo > 1500)
{
return SendErrorMessage(playerid, "Ammo cannot be above 1500");
}
if(PlayerInfo[iPlayerID][pLevel] == 1)
{
return SendErrorMessage(playerid, "Player has to be above level 1");
}
///////////////Execution//////////////////////
SafeGivePlayerWeapon(iPlayerID, iWeapon, iAmmo);
//////////////Messages////////////////////////
new szMessage[67+MAX_PLAYER_NAME+2+4+MAX_PLAYER_NAME+2+2+4],
iYear,
iMonth,
iDate;
//////////////////////Player/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
format(szMessage, 46+MAX_PLAYER_NAME+2+4,"[ADMIN] %s just gave you a weapon [%d] with %d ammo", GetPlayerNameEx(playerid), iWeapon, iAmmo);
SendClientMessage(iPlayerID, COLOR_YELLOW, szMessage);
///////////////////////Admin/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
format(szMessage, 46+MAX_PLAYER_NAME+2+4,"[ADMIN] You just gave %s a weapon [%d] with %d ammo", GetPlayerNameEx(iPlayerID), iWeapon, iAmmo);
SendClientMessage(playerid, COLOR_YELLOW, szMessage);
////////////////////////////////////////////////////////////Logging//////////////////////////////////////////////////////////////////////////
getdate(iYear, iMonth, iDate);
format(szMessage, 67+MAX_PLAYER_NAME+2+4+MAX_PLAYER_NAME+2+2+4,"[/agivegun] %s was just given a [%d] with %d ammo by administrator %s [%d/%d/%d]", GetPlayerNameEx(iPlayerID), iWeapon, iAmmo, GetPlayerNameEx(playerid), iDate, iMonth, iYear);
AbuseLog(szMessage);
}
return 1;
}
AW: zcmd 0.3e causes crash -
Johndaonee - 24.06.2012
If yes, do I just need to switch to any other processor or is there a fix?
Re: zcmd 0.3e causes crash -
JaKe Elite - 24.06.2012
No its not zcmd
there is something wrong in your code.
AW: zcmd 0.3e causes crash -
Johndaonee - 24.06.2012
So a bug flies in right after upgrading to 0.3e
Thanks Romel for your answer I will dig into it and find out whats wrong
Re: zcmd 0.3e causes crash -
Lordzy - 24.06.2012
Well try using YCMD and check.
Re: zcmd 0.3e causes crash -
Lordzy - 24.06.2012
Well try using YCMD and check.
Edit: im sorry for spam it happened because of internet crash. Im sorry