Something Is Wrong!
#1

Hello!

I Need help?

Something Is Wrong In My Code!

Код:
//---------------------------------Admin Give Gun Lvl-3-------------------------
	if(strcmp(cmd, "/giveweps", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, CWARN, "USAGE: /giveweps (PlayerID) (WeaponID) (Ammo)");
				return 1;
			}
			new playa;
			new gun;
			new ammo;
			playa = ReturnUser(tmp);
			tmp = strtok(cmdtext, idx);
			gun = strval(tmp);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, CWARN, "USAGE: /giveweps (PlayerID) (WeaponID) (Ammo)");
				SendClientMessage(playerid, CWARN, "3(Club) 4(knife) 5(bat) 6(Shovel) 7(Cue) 8(Katana) 10-13(Dildo) 14(Flowers) 16(Grenades) 18(Molotovs) 22(Pistol) 23(SPistol)");
				SendClientMessage(playerid, CWARN, "24(Eagle) 25(shotgun) 29(MP5) 30(AK47) 31(M4) 33(Rifle) 34(Sniper) 37(Flamethrower) 41(spray) 42(exting) 43(Camera) 46(Parachute)");
				return 1;
			}
			if(gun < 1||gun > 46||gun==27||gun==1||gun==2||gun==9||gun==17||gun==19||gun==20||gun==21||gun==36||gun==38||gun==39||gun==40||gun==44||gun==45)
			{ SendClientMessage(playerid, CWARN, "  wrong WeaponID!"); return 1; }
			tmp = strtok(cmdtext, idx);
			ammo = strval(tmp);
			if(ammo <1||ammo > 999)
			{ SendClientMessage(playerid, CWARN, "  dont go below 1 or above 999 bullets!"); return 1; }
			if (PlayerInfo[playerid][pAdmin] >= 4)
			{
			  if(IsPlayerConnected(playa))
			  {
			    if(playa != INVALID_PLAYER_ID)
			    {
						GivePlayerWeapon(playa, gun, ammo);
					}
				}
			}
			else
			{
				SendClientMessage(playerid, CWARN, "You Are Not An Admin!");
			}
		}
		return 1;
	}
//-------------------------------Admin Give Gun END-----------------------------
And I Want Change Admin To
Код:
if (PlayerInfo[playerid][pAdmin] >= 4) To -> (PlayerInfo[playerid][Level] >= 3) {
Plz Help Me.

Thank You!
Reply
#2

Sorry I forgot Errors!

Код:
C:\Documents and Settings\Elar\My Documents\Failid\Server\Stunt-Drift-Dm-Rp™ (V 1.1-b)\gamemodes\x-mode.pwn(18762) : error 017: undefined symbol "ReturnUser"
C:\Documents and Settings\Elar\My Documents\Failid\Server\Stunt-Drift-Dm-Rp™ (V 1.1-b)\gamemodes\x-mode.pwn(18778) : error 017: undefined symbol "PlayerInfo"
C:\Documents and Settings\Elar\My Documents\Failid\Server\Stunt-Drift-Dm-Rp™ (V 1.1-b)\gamemodes\x-mode.pwn(18778) : warning 215: expression has no effect
C:\Documents and Settings\xxx\My Documents\Failid\Server\Stunt-Drift-Dm-Rp™ (V 1.1-b)\gamemodes\x-mode.pwn(18778) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\xxx\My Documents\Failid\Server\Stunt-Drift-Dm-Rp™ (V 1.1-b)\gamemodes\x-mode.pwn(18778) : error 029: invalid expression, assumed zero
C:\Documents and Settings\xxx\My Documents\Failid\Server\Stunt-Drift-Dm-Rp™ (V 1.1-b)\gamemodes\x-mode.pwn(18778) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


5 Errors.
Reply
#3

Plz Help!
Reply
#4

1. Don't triple post. Use the 'Modify' button.
2.

pawn Код:
enum PlayerData
{
pAdmin
}

new PlayerInfo[MAX_PLAYERS][PlayerData];
3. Download dutils.
Reply
#5

dude don't bump ffs it's like the third or fourth time i'm tellin u
and could you be more explicit?
and fuking learn how to do it yourself
your asking here all the time instead of trying to learn it with the
www.wiki.sa-mp.com

learn the pawnlanguage
Reply
#6

http://www.wiki.sa-mp.com/

that site not work!!!
Reply
#7

1. Did you read my post?
2. Click here...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)