Author Topic: Static help needed! I am making scripts gups v5  (Read 9785 times)

0 Members and 2 Guests are viewing this topic.

Offline Terminatorupgrade 2

  • Wiseguy
  • **
  • Posts: 91
  • pawno scripter
    • View Profile
Static help needed! I am making scripts gups v5
« on: November 01, 2010, 01:30:04 pm »
hey i need help
i am a pawno scripter aOh i am a pawno Noob
i am king this script
!superheal
in this script i need to get cost 500

Quote
   else if (strcmp(cmd, "!superheal", true) == 0) {
        else var %cost = 1000;
      new Float:Health; GetPlayerHealth(playerid,Health);
      new snick[256], plr, health[256], armour[256], szMsg[256];
       snick = strtok(cmdtext, idx), plr = FindPlayerIDFromString(snick), armour = strtok(cmdtext, idx), health = strtok(cmdtext, idx);
      SetPlayerHealth(playerid,100.0);
      SetPlayerArmour(playerid,100.0);
      SetVehicleHealth(playerid,1000.0);
        SendClientMessage(playerid,COLOR_GREEN,"You have been Supered Healed.");
        return 1;

i need help to fix it

Offline nacho_gb1

  • Street Thug
  • *
  • Posts: 9
  • I like VC-MP and pawn script
    • View Profile
Re: Static help needed! I am making scripts gups v5
« Reply #1 on: November 01, 2010, 03:32:15 pm »
hi  ,
Code: [Select]
if (strcmp(cmdtext, "/superheal", true)==0)
{
        new Float:Health; GetPlayerHealth(playerid,Health);
SetPlayerHealth(playerid,100.0);
        SetPlayerArmour(playerid,100.0);
        SetVehicleHealth(playerid,1000.0);
        GivePlayerMoney(playerid,-500); //Change 500 for the money you want to remove it using this command
SendClientMessage(playerid,COLOR_GREEN,"You have been Supered Healed.");
return 1;
}

I think it is to, sorry for my bad English

or

Code: [Select]
if (strcmp(cmdtext, "/superheal", true)==0)
{
        new Float:Health; GetPlayerHealth(playerid,Health);
SetPlayerHealth(playerid,100.0);
        SetPlayerArmour(playerid,100.0);
        GivePlayerMoney(playerid,-500); //Change 500 for the money you want to remove it using this command
SendClientMessage(playerid,COLOR_GREEN,"You have been Supered Healed.");
if(IsPlayerInAnyVehicle(playerid))
    {
SetVehicleHealth(playerid,1000.0);
        GivePlayerMoney(playerid,-500); //Change 500 for the money you want to remove it using this command
SendClientMessage(playerid,COLOR_GREEN,"You have been Supered Healed.");
}
return 1;
}

Any failure Own, "correction" Pliz

Saludos,Desde Chile
« Last Edit: November 01, 2010, 03:37:45 pm by nacho_gb1 »

Offline Terminatorupgrade 2

  • Wiseguy
  • **
  • Posts: 91
  • pawno scripter
    • View Profile
Re: Static help needed! I am making scripts gups v5
« Reply #2 on: November 01, 2010, 05:26:50 pm »
Thanks ~ ;D ;D ;D ;D ;D ;D ;D ;D for fail

/superheal is not working
i have modified it to !superheal but it is not costing
« Last Edit: November 01, 2010, 05:37:55 pm by Terminatorupgrade 2 »

Offline nacho_gb1

  • Street Thug
  • *
  • Posts: 9
  • I like VC-MP and pawn script
    • View Profile
Re: Static help needed! I am making scripts gups v5
« Reply #3 on: November 01, 2010, 07:50:29 pm »
ejejejej Sorry ,  I come from samp and pawno script for samp,and do not use the sign !   :P :P .

Code: [Select]
if (strcmp(cmdtext, "!superheal", true)==0)
is so?

Saludos

Offline Terminatorupgrade 2

  • Wiseguy
  • **
  • Posts: 91
  • pawno scripter
    • View Profile
Re: Static help needed! I am making scripts gups v5
« Reply #4 on: November 03, 2010, 04:51:58 pm »
working but not costing ??? ??? :o :o :o





anyway big thanks be happy ;) :D :D :D
« Last Edit: November 03, 2010, 04:55:17 pm by Terminatorupgrade 2 »

Offline Terminatorupgrade 2

  • Wiseguy
  • **
  • Posts: 91
  • pawno scripter
    • View Profile
Re: Static help needed! I am making scripts gups v5
« Reply #5 on: November 05, 2010, 12:11:45 pm »
any more sulotion please

Offline Terminatorupgrade 2

  • Wiseguy
  • **
  • Posts: 91
  • pawno scripter
    • View Profile
Re: Static help needed! I am making scripts gups v5
« Reply #6 on: November 05, 2010, 12:56:19 pm »
Quote
if (strcmp(cmdtext, "/superheal", true)==0)
   {
        new Float:Health; GetPlayerHealth(playerid,Health);
      SetPlayerHealth(playerid,100.0);
        SetPlayerArmour(playerid,100.0);
        SetVehicleHealth(playerid,1000.0);
        GivePlayerMoney(playerid,-500); //Change 500 for the money you want to remove it using this command
      SendClientMessage(playerid,COLOR_GREEN,"You have been Supered Healed.");
      return 1;
   }


instead of this use

Quote
  if (strcmp(cmdtext, "!superheal", true)==0)
   {
        new Float:Health; GetPlayerHealth(playerid,Health);
      SetPlayerHealth(playerid,100.0);
      SetPlayerArmour(playerid,100.0);
        SetVehicleHealth(playerid,1000.0);
        if (GetPlayerMoney(playerid) > 500) DecPlayerHandCash(playerid,500);
      SendClientMessage(playerid,COLOR_GREEN,"You have been Supered Healed.");
      return 1;
   }

code changed
Quote
GivePlayerMoney(playerid,-500); //Change 500 for the money you want to remove it using this command
to
Quote
if (GetPlayerMoney(playerid) > 500) DecPlayerHandCash(playerid,500);

hahha i made it myself thanks god

Offline nacho_gb1

  • Street Thug
  • *
  • Posts: 9
  • I like VC-MP and pawn script
    • View Profile
Re: Static help needed! I am making scripts gups v5
« Reply #7 on: November 05, 2010, 08:58:34 pm »
DecPlayerHandCash?  :o :o

what  function hace??

Saludos

Offline Terminatorupgrade 2

  • Wiseguy
  • **
  • Posts: 91
  • pawno scripter
    • View Profile
Re: Static help needed! I am making scripts gups v5
« Reply #8 on: November 06, 2010, 02:31:48 pm »
its works Hurray!!! ;D ;D ;D

Offline Madara

  • Street Thug
  • *
  • Posts: 48
    • View Profile
Re: Static help needed! I am making scripts gups v5
« Reply #9 on: November 06, 2010, 10:15:33 pm »
if you wannna, you can also use this:

Quote
    if (strcmp(cmdtext, "!superheal", true)==0) {
          new msn[256],Float:Health, Float:Armour, money;
            GetPlayerHealth(playerid,Health), GetPlayerArmour(playerid, Armour), money = GetPlayerHandCash(gPlayers[playerid]);
          if(GetPlayerState(playerid) == 2) {
                new Float:armveh; GetVehicleHealth(GetPlayerVehicleID(playerid),armveh);
                if (money < 500) {
               format(msn,256,"** [Error] >> You have $ %d in Cash, Need $ %d more for Superheal.",money, 500 - money);
                SendClientMessage(playerid,0x33AA33AA,msn);
            }
            else if( armveh == 1000 ) SendClientMessage(playerid,0x33AA33AA,"* [Error] >> You Vehicle have 100% HP , don't need it.");
                else {
                     SetPlayerHealth(playerid,100.0);
                   SetPlayerArmour(playerid,100.0);
                SetVehicleHealth(GetPlayerVehicleID(playerid),1000.0);
                SetVehicleTyre(GetPlayerVehicleID(playerid),1);
                   SendClientMessage(playerid,0x33AA33AA,"** pm >> You have been Supere Healed in you Vehicle.");
                   DecPlayerHandCash(playerid,500);
            }
           }
           else {
           if(GetPlayerState(playerid) == 1) {
                if (money < 500) {
                format(msn,256,"** [Error] >> You have $ %d in Cash, Need $ %d more for Superheal.",money, 500 - money);
                   SendClientMessage(playerid,0x33AA33AA,msn);
            }
             else if( ( Health == 100 ) && ( Armour == 100 ) ) SendClientMessage(playerid,0x33AA33AA,"* [Error] >> You have 100% HP and 100% ARM, don't need it.");
            else {
                SetPlayerHealth(playerid,100.0);
                    SetPlayerArmour(playerid,100.0);
                    SendClientMessage(playerid,0x33AA33AA,"** pm >> You have been Supere Healed.");
                    DecPlayerHandCash(playerid,500);
                    }
          }
      }
    return 1;
    }

Offline Terminatorupgrade 2

  • Wiseguy
  • **
  • Posts: 91
  • pawno scripter
    • View Profile
Re: Static help needed! I am making scripts gups v5
« Reply #10 on: December 02, 2010, 01:16:05 pm »
Madara thanks!                                                                                                                                                                                                                                                                                                                             

Offline Terminatorupgrade 2

  • Wiseguy
  • **
  • Posts: 91
  • pawno scripter
    • View Profile
Re: Static help needed! I am making scripts gups v5
« Reply #11 on: December 02, 2010, 02:56:20 pm »
hi BAN system is not working

Quote
else if (strcmp(cmd, "ban", true) == 0) {
      new szMsg[256], reason[256], plr;
      tmp = strtok(cmdtext, idx), plr = FindPlayerIDFromString(tmp), reason = strtok(cmdtext, idx);
      if(PlayerInfo[playerid][Logged] != 1) SendClientMessage(playerid, COLOR_RED, "You need to login first!");
      else if(!IsPlayerCommandLevel(playerid,"ban")) SendClientMessage(playerid, COLOR_RED, "You don't have access to use this command!");
      else if (!strlen(reason)) SendClientMessage(playerid,COLOR_RED,"USAGE: /c ban [Nick/ID] [Reason]");
        else if (plr == INACTIVE_PLAYER_ID) SendClientMessage(playerid,COLOR_RED,"Error: Unknown player");
      else {
         new string[256],IP[256];
         format(file, sizeof(file), BANS_FILE, gPlayers[plr]);
         format(szMsg,sizeof(szMsg),"Admin %s Banned player:[ %s ] Reason:[ %s ]",gPlayers[playerid],gPlayers[plr],cmdtext[strlen(tmp)+5]);
         SendClientMessageToAll(COLOR_GREEN,szMsg);

         GetPlayerIp(playerid,IP,256);
         format(string,256,"%s",IP);
         dini_Create(file);
         dini_Set(file, "Login", "0");
         dini_Set(file, "Ip", string);
         dini_Set(file, "BannedBy", gPlayers[playerid]);
         dini_Set(file, "Reason", cmdtext[strlen(tmp)+5]);
         Ban(plr);
      }
      return 1;
   }
plz help to correct it plz

Offline Technohopper

  • Street Thug
  • *
  • Posts: 29
  • I like pizza xD
    • View Profile
Re: Static help needed! I am making scripts gups v5
« Reply #12 on: December 02, 2010, 07:45:24 pm »
good luck with scripting my friend :)

Offline Terminatorupgrade 2

  • Wiseguy
  • **
  • Posts: 91
  • pawno scripter
    • View Profile
Re: Static help needed! I am making scripts gups v5
« Reply #13 on: December 02, 2010, 11:53:50 pm »
how to fix ban system?

Offline Madara

  • Street Thug
  • *
  • Posts: 48
    • View Profile
Re: Static help needed! I am making scripts gups v5
« Reply #14 on: December 03, 2010, 04:37:54 am »
in Pawn, has bugs, but you can make one, it's easy to do.   ::)