In rage
#1

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"cmdtrue))
    {
        new 
skin GetPlayerSkin(playerid);
        
tmp strtok(cmdtextidx);
        if(!
strlen(tmp)) return SendClientMessage(playerid0xFF4040AA"SYNTAX: /Hair 1 - 2 /removemyhair to remove");
        
TextDrawSetString(MsgBox,"   Hair obtained");
        
TextDrawShowForPlayer(playeridMsgBox);
        
SetTimerEx("Hide"1500false"d"playerid);//19077 18975
        
switch(strval(tmp))
        {
            case 
1SetPlayerAttachedObject(playeridGetSlot(playerid), 190772SkinOffSet[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 
2SetPlayerAttachedObject(playeridGetSlot(playerid), 189752SkinOffSet[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(playerid0xFF4040AA"SYNTAX: /Hair 1 - 2");
        }
        return 
1;
    } 
Reply
#2

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;
    }
Reply
#3

ill test it tty
Reply
#4

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.
Reply
#5

use IsPlayerInRangeOfPoint
if(IsPlayerInRangeOfPoint(playerid, 5, 412.1661,-53.9825,1001.8984))
Reply
#6

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
Reply
#7

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;
    }
Reply
#8

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


Forum Jump:


Users browsing this thread: 2 Guest(s)