SA-MP Forums Archive
Weapon script problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Weapon script problem (/showthread.php?tid=162824)



Weapon script problem - Chrillzen - 24.07.2010

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;
	}



Re: Weapon script problem - Kar - 24.07.2010

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;
}



Re: Weapon script problem - selten98 - 24.07.2010

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;
}



Re: Weapon script problem - selten98 - 24.07.2010

hmmm he was faster


Re: Weapon script problem - Chrillzen - 24.07.2010

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


Re: Weapon script problem - Chrillzen - 24.07.2010

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

EDIT: Shi' sorry for double post


Re: Weapon script problem - Kar - 24.07.2010

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


Re: Weapon script problem - Chrillzen - 24.07.2010

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