I need some help here
#1

Hello peoples i've made /takegunm4 command for Army .. but few warning appear and CMD doesn't work how it should.
This is the CMD:
Код:
if (strcmp("/takem4", cmdtext, true, 10) == 0)
	{
		if(IsPlayerInRangeOfPoint(2790.4155,-2486.0696,13.6471))
		GivePlayerWeapon(playerid,31,400); // 31 is weapons (m4) ID and 200 is ammount of bullets
		else SendClientMessage(playerid, COLOR_RED, "You have to be in Army Base Garage Three to take m4");
        new playername[24];
        new str[128]; // String
        GetPlayerName(playerid, playername, sizeof(playername)); // Gets the player name for this action.
         format(str, sizeof(str), "%s has opened a box and takes out m4 with some ammo", playername); // What it's going to look like.
         SendClientMessageToAll(COLOR_RED, str); // Color to send the message to everyone in.
		 return 1;
	}
Код:
Warnings:

C:\Documents and Settings\NO\My Documents\Downloads\New Folder\gamemodes\Nrd.pwn(664) : warning 213: tag mismatch
C:\Documents and Settings\NO\My Documents\Downloads\New Folder\gamemodes\Nrd.pwn(664) : warning 202: number of arguments does not match definition
C:\Documents and Settings\NO\My Documents\Downloads\New Folder\gamemodes\Nrd.pwn(664) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Warnings.
I wanted to make /takegun cmd and /me takes out a m4 from the box with it.Takegun works but ME isn't.

Help?
Reply
#2

pawn Код:
if(IsPlayerInRangeOfPoint(playerid,5.0,2790.4155,-2486.0696,13.6471))
Reply
#3

Thanks,it worked.But now i got another problem,i tested CMD IG and it works but when i'm not in range of point it and do /takegunm4 it says You need to be in army base garage 3 to take m4 and down /me takes out m4 from the box. -_-'

Should i add one more is playerinrangeofpoint ?
Reply
#4

pawn Код:
if (strcmp("/takem4", cmdtext, true) == 0)
{
    if(IsPlayerInRangeOfPoint(playerid,5.0,2790.4155,-2486.0696,13.6471))
    {
        GivePlayerWeapon(playerid,31,400); // 31 is weapons (m4) ID and 200 is ammount of bullets
        new playername[24];
        new str[128]; // String
        GetPlayerName(playerid, playername, sizeof(playername)); // Gets the player name for this action.
        format(str, sizeof(str), "%s has opened a box and takes out m4 with some ammo", playername); // What it's going to look like.
        SendClientMessageToAll(COLOR_RED, str); // Color to send the message to everyone in.
    }
    else SendClientMessage(playerid, COLOR_RED, "You have to be in Army Base Garage Three to take m4");
    return 1;
}
Reply
#5

Thanks MadeMan you helped me a lot,Thanks so much again!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)