thanks Boss
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menuelse if (strcmp(cmd, "!wep", true) == 0) {
new tmp2[256], wep;
tmp = strtok(cmdtext, idx), tmp2 = strtok(cmdtext, idx);
if(wep_init != 33) GivePlayerWeapon(playerid,0,1);
else SendClientMessage(playerid,COLOR_RED,"No minigun for you, sorry.");
if(PlayerInfo[playerid][Logged] != 1) SendClientMessage(playerid, COLOR_RED, "You need to login first!");
else if (!strlen(tmp2)) SendClientMessage(playerid, COLOR_GREEN, "USAGE: !wep [WeaponName/ID] [Ammo]");
else {
wep = FindWepIDFromString(tmp);
SetPlayerWeapon(playerid,wep,strval(tmp2));
}
return 1;
}
Quote from: Ettans on March 02, 2010, 01:57:16 PMthank you very much!
I did an automatic HP/Armour check for you. It runs every minute and checks if the players HP or Armour is over 75.
/* Add to the top of your gamemode */
forward AntiCheat(playerid);
/* Add to OnGameModeInit callback */
SetTimer("AntiCheat",60000,1);
/* Add anywhere in your script */
public AntiCheat(playerid)
{
for(new i = 0; i < 50; i++)
{
if(IsPlayerConnected(i))
{
new Float:hp,
Float:armour;
if(GetPlayerHealth(i,hp) > 75)
{
/* HP over 75, do your stuff here */
}
else if(GetPlayerArmour(i,armour) > 75)
{
/* Armour over 75, do your stuff here */
}
}
}
return 1;
}
Pastebin link: http://pastebin.com/BkRanF2a
Quote from: Ettans on February 27, 2010, 09:08:41 AMthank you very much!!
You don't have dudb.inc in /pawno/includes directory.
http://dracoblue.net/download/dudb-24/31/