In rage -
kepa333 - 25.06.2012
How do I put a range into a filter Script , Aint same like On A gamemode Since I get 100 errors
412.1661,-53.9825,1001.8984 I need those Cordinates On this Command
I wish that u must be there to use the command Anyone?
PHP Code:
if(!strcmp("/hair", cmd, true))
{
new skin = GetPlayerSkin(playerid);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, 0xFF4040AA, "SYNTAX: /Hair 1 - 2 /removemyhair to remove");
TextDrawSetString(MsgBox," Hair obtained");
TextDrawShowForPlayer(playerid, MsgBox);
SetTimerEx("Hide", 1500, false, "d", playerid);//19077 18975
switch(strval(tmp))
{
case 1: SetPlayerAttachedObject(playerid, GetSlot(playerid), 19077, 2, SkinOffSet[skin][0], SkinOffSet[skin][1], SkinOffSet[skin][2], SkinOffSet[skin][3], SkinOffSet[skin][4], SkinOffSet[skin][5], SkinOffSet[skin][8], SkinOffSet[skin][8], SkinOffSet[skin][8]);
case 2: SetPlayerAttachedObject(playerid, GetSlot(playerid), 18975, 2, SkinOffSet[skin][0], SkinOffSet[skin][1], SkinOffSet[skin][2], SkinOffSet[skin][3], SkinOffSet[skin][4], SkinOffSet[skin][5], SkinOffSet[skin][8], SkinOffSet[skin][8], SkinOffSet[skin][8]);
default: SendClientMessage(playerid, 0xFF4040AA, "SYNTAX: /Hair 1 - 2");
}
return 1;
}
Re: In rage -
Makaveli93 - 25.06.2012
pawn Code:
if(!strcmp("/hair", cmd, true))
{
if(!IsPlayerInRange(playerid, 5, 412.1661,-53.9825,1001.8984)) return SendClientMessage(playerid, 0xFFFFFF, "ERROR: You're not in range."); // Range Check
new skin = GetPlayerSkin(playerid);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, 0xFF4040AA, "SYNTAX: /Hair 1 - 2 /removemyhair to remove");
TextDrawSetString(MsgBox," Hair obtained");
TextDrawShowForPlayer(playerid, MsgBox);
SetTimerEx("Hide", 1500, false, "d", playerid);//19077 18975
switch(strval(tmp))
{
case 1: SetPlayerAttachedObject(playerid, GetSlot(playerid), 19077, 2, SkinOffSet[skin][0], SkinOffSet[skin][1], SkinOffSet[skin][2], SkinOffSet[skin][3], SkinOffSet[skin][4], SkinOffSet[skin][5], SkinOffSet[skin][8], SkinOffSet[skin][8], SkinOffSet[skin][8]);
case 2: SetPlayerAttachedObject(playerid, GetSlot(playerid), 18975, 2, SkinOffSet[skin][0], SkinOffSet[skin][1], SkinOffSet[skin][2], SkinOffSet[skin][3], SkinOffSet[skin][4], SkinOffSet[skin][5], SkinOffSet[skin][8], SkinOffSet[skin][8], SkinOffSet[skin][8]);
default: SendClientMessage(playerid, 0xFF4040AA, "SYNTAX: /Hair 1 - 2");
}
return 1;
}
Re: In rage -
kepa333 - 25.06.2012
ill test it tty
Re: In rage -
kepa333 - 25.06.2012
C:\Users\Snor !\Desktop\Real Life ENG\filterscripts\hair.pwn(362) : error 017: undefined symbol "IsPlayerInRange"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
Re: In rage -
Skaizo - 25.06.2012
use IsPlayerInRangeOfPoint
if(IsPlayerInRangeOfPoint(playerid, 5, 412.1661,-53.9825,1001.8984))
Re: In rage -
kepa333 - 25.06.2012
When i add it like this , if(IsPlayerInRangeOfPoint(playerid, 5, 413.4113,-51.3633,1001.8984)) return SendClientMessage(playerid, 0xFFFFFF, "ERROR: You're not in range."); // Range Check
It keep saying you are not in range even At the point
Re: In rage -
Dubya - 25.06.2012
pawn Code:
if(!strcmp("/hair", cmd, true))
{
if(!IsPlayerInRangeOfPoint(playerid, 5, 412.1661,-53.9825,1001.8984)) return SendClientMessage(playerid, 0xFFFFFF, "ERROR: You're not in range."); // Range Check
new skin = GetPlayerSkin(playerid);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, 0xFF4040AA, "SYNTAX: /Hair 1 - 2 /removemyhair to remove");
TextDrawSetString(MsgBox," Hair obtained");
TextDrawShowForPlayer(playerid, MsgBox);
SetTimerEx("Hide", 1500, false, "d", playerid);//19077 18975
switch(strval(tmp))
{
case 1: SetPlayerAttachedObject(playerid, GetSlot(playerid), 19077, 2, SkinOffSet[skin][0], SkinOffSet[skin][1], SkinOffSet[skin][2], SkinOffSet[skin][3], SkinOffSet[skin][4], SkinOffSet[skin][5], SkinOffSet[skin][8], SkinOffSet[skin][8], SkinOffSet[skin][8]);
case 2: SetPlayerAttachedObject(playerid, GetSlot(playerid), 18975, 2, SkinOffSet[skin][0], SkinOffSet[skin][1], SkinOffSet[skin][2], SkinOffSet[skin][3], SkinOffSet[skin][4], SkinOffSet[skin][5], SkinOffSet[skin][8], SkinOffSet[skin][8], SkinOffSet[skin][8]);
default: SendClientMessage(playerid, 0xFF4040AA, "SYNTAX: /Hair 1 - 2");
}
return 1;
}
Re: In rage -
SKAzini - 25.06.2012
pawn Code:
if(!strcmp("/hair", cmd, true))
{
if(!IsPlayerInRangeOfPoint(playerid, 5, 412.1661,-53.9825,1001.8984))
{
new skin = GetPlayerSkin(playerid);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, 0xFF4040AA, "SYNTAX: /Hair 1 - 2 /removemyhair to remove");
TextDrawSetString(MsgBox," Hair obtained");
TextDrawShowForPlayer(playerid, MsgBox);
SetTimerEx("Hide", 1500, false, "d", playerid);//19077 18975
switch(strval(tmp))
{
case 1: SetPlayerAttachedObject(playerid, GetSlot(playerid), 19077, 2, SkinOffSet[skin][0], SkinOffSet[skin][1], SkinOffSet[skin][2], SkinOffSet[skin][3], SkinOffSet[skin][4], SkinOffSet[skin][5], SkinOffSet[skin][8], SkinOffSet[skin][8], SkinOffSet[skin][8]);
case 2: SetPlayerAttachedObject(playerid, GetSlot(playerid), 18975, 2, SkinOffSet[skin][0], SkinOffSet[skin][1], SkinOffSet[skin][2], SkinOffSet[skin][3], SkinOffSet[skin][4], SkinOffSet[skin][5], SkinOffSet[skin][8], SkinOffSet[skin][8], SkinOffSet[skin][8]);
default: SendClientMessage(playerid, 0xFF4040AA, "SYNTAX: /Hair 1 - 2");
}
}
else
{
SendClientMessage(playerid, 0xFFFFFF, "ERROR: You're not in range."); // Range Check
}
return 1;
}