Need Help with this please
#1

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

Reply
#2

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;
}
Reply
#3

thanks bro.......................
add me on xfire.
Reply
#4

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

999999 Will suffice.

pawn Код:
#define GOD_HEALTH 99999

SetPlayerHealth(playerid, GOD_HEALTH);
Reply
#5

Same thing?
Reply
#6

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

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)