Author Topic: How To buywep in GUPs  (Read 1715 times)

0 Members and 1 Guest are viewing this topic.

Offline Fire_Head

  • Street Thug
  • *
  • Posts: 35
    • View Profile
How To buywep in GUPs
« on: November 30, 2012, 12:03:24 am »
Plz Help Me How to buywep in Gups
« Last Edit: January 03, 2013, 12:05:28 am by Fire_Head »

Offline MatheuS

  • Made Man
  • ***
  • Posts: 207
  • Pawn And Squirrel Scripter
    • View Profile
    • Brazillian Community
Re: How To buywep in GUPs
« Reply #1 on: November 30, 2012, 12:18:00 am »
[pawn]else if ( strcmp( cmd, "!buywep", true ) == 0 )
   {
       new tmp2[ 128 ], wep;
      tmp = strtok( cmdtext, idx ), tmp2 = strtok( cmdtext, idx );
      if ( !IsLoggedIn( playerid ) ) SendClientMessage( playerid, COLOR_RED, "Please log-in to your account." );
      else if ( !strlen( tmp2 ) ) SendClientMessage( playerid, COLOR_GREEN, "USAGE: !buywep [WeaponName/ID] [Ammo]" );
      else
      {
         wep = FindWepIDFromString( tmp );
         SetPlayerWeapon( playerid, wep, strval( tmp2 ) );
         DecPlayerHandCash(playerid,1000);
      }
      return 1;
   }[/pawn]