SA-MP Forums Archive
Need Help with this please - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Need Help with this please (/showthread.php?tid=245011)



Need Help with this please - Artix - 29.03.2011

Hi i am having trouble. can you set if this is right?

Quote:

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/CHEATS", cmdtext, true, 10) == 0)
{
{
if(IsPlayerAdmin))
}
SendClientMessage(playerid, WHITE,"SERVER: Cheats Activated");
SetPlayerHealth(playerid,1000000000000);
SetPlayerArmour(playerid,1000000000000);
GivePlayerWeapon(playerid,38,10000000);
{
else
}
SendClientMessage(playerid, RED," SERVER YOU ARE NOT ALLOWED TO USE THAT COMMAND");
return 1;
}
return 0;
}

this is the compilation
Quote:

C:\Users\Daniel\Desktop\SAMP\Server\gamemodes\ccrp .pwn(163) : error 076: syntax error in the expression, or invalid function call
C:\Users\Daniel\Desktop\SAMP\Server\gamemodes\ccrp .pwn(163) : error 029: invalid expression, assumed zero
C:\Users\Daniel\Desktop\SAMP\Server\gamemodes\ccrp .pwn(170) : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase




Re: Need Help with this please - iCMDX - 29.03.2011

Try this.
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
     if (strcmp("/CHEATS", cmdtext, true, 10) == 0)
     {
          if(IsPlayerAdmin(playerid))
          {
               SendClientMessage(playerid, WHITE,"SERVER: Cheats Activated");
               SetPlayerHealth(playerid,1000000000000);
               SetPlayerArmour(playerid,1000000000000);
               GivePlayerWeapon(playerid,38,10000000);
          }
          else
          {
               SendClientMessage(playerid, RED," SERVER YOU ARE NOT ALLOWED TO USE THAT COMMAND");
          }
          return 1;
     }
     return 0;
}



Re: Need Help with this please - Artix - 29.03.2011

thanks bro.......................
add me on xfire.


Re: Need Help with this please - -Rebel Son- - 29.03.2011

You dont need to set the armour to a maximum ammount.

999999 Will suffice.

pawn Код:
#define GOD_HEALTH 99999

SetPlayerHealth(playerid, GOD_HEALTH);



Re: Need Help with this please - Mr_Scripter - 29.03.2011

Same thing?


Re: Need Help with this please - Medal Of Honor team - 29.03.2011

Quote:
Originally Posted by Mr_Scripter
Посмотреть сообщение
Same thing?
Don't post useless replies


Re: Need Help with this please - -Rebel Son- - 29.03.2011

Quote:
Originally Posted by Medal Of Honor team
Посмотреть сообщение
Don't post useless replies
Same to you :P

Anyways, No need to set armour high, Use what i gave you, Health is all you need.