Weapon script problem
#1

Hi everybody, i'm working on a easy weapon system but i have a problem if i write /again and if i am at the position it still sais "You are not near the Arms Dealer place!

Код:
if (!strcmp("/again", cmdtext))
	{
       if(IsPlayerInRangeOfPoint(playerid, 4.0, 2097.2568,-1195.5635,23.8585,179.5196))
		SendClientMessage(playerid, white, "Arms Dealer: Who the fuck is it?");
		SendClientMessage(playerid, white, "/answer to answer /decline to not.");
		{
	 else
	 {
    SendClientMessage(playerid, white, "You are not near the Arms Dealer place!");
    }
		return 1;
	}
Reply
#2

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/Knock", cmdtext, true, 10) == 0)
    {
        if(IsPlayerInRangeOfPoint(playerid, 4.0, 2097.2568,-1195.5635,23.8585,179.5196))
        SendClientMessage(playerid, white, "You are knocking on the door..");
        SendClientMessage(playerid, red, "No one answered knock again! /again.");
    }
    else
    {
        SendClientMessage(playerid, white, "You are not near the Arms Dealer place!");
    }
    return 0;
}
Reply
#3

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/Knock", cmdtext, true) == 0)
    {
    if(IsPlayerInRangeOfPoint(playerid, 4.0, 2097.2568,-1195.5635,23.8585))
    SendClientMessage(playerid, white, "You are knocking on the door.");
    SendClientMessage(playerid, red, "No one answered knock again! /again.");
    }
    else
    {
    SendClientMessage(playerid, white, "You are not near the Arms Dealer place!");
    }
return 1;
}
Reply
#4

hmmm he was faster
Reply
#5

Quote:
Originally Posted by Kar
Посмотреть сообщение
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/Knock", cmdtext, true, 10) == 0)
    {
        if(IsPlayerInRangeOfPoint(playerid, 4.0, 2097.2568,-1195.5635,23.8585,179.5196))
        SendClientMessage(playerid, white, "You are knocking on the door..");
        SendClientMessage(playerid, red, "No one answered knock again! /again.");
    }
    else
    {
        SendClientMessage(playerid, white, "You are not near the Arms Dealer place!");
    }
    return 0;
}
Thanks it helped i think :P
Reply
#6

Quote:
Originally Posted by selten98
Посмотреть сообщение
hmmm he was faster
Thanks, please check my new problem :P

EDIT: Shi' sorry for double post
Reply
#7

pawn Код:
if (!strcmp("/again", cmdtext))
{
    if(IsPlayerInRangeOfPoint(playerid, 4.0, 2097.2568,-1195.5635,23.8585,179.5196))
    {
        SendClientMessage(playerid, white, "Arms Dealer: Who the fuck is it?");
        SendClientMessage(playerid, white, "/answer to answer /decline to not.");
    }
    else
    {
        SendClientMessage(playerid, white, "You are not near the Arms Dealer place!");
    }
    return 1;
}
make sure the return 0 i put in ur cmd make sure its last and not before this
Reply
#8

Ok, i'm giving up nothing works...... thanks anyway
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)