Little help
#1

Hey just a simple question,
I'm making a command but i have a problem
pawn Код:
if (strcmp("/blow", cmdtext, true, 10) == 0)
    {
        if(GetPlayerSkin(playerid == 111) & (IsPlayerInRangeOfPoint(playerid, 3908.1470,-2664.6038,0.8423, 5))
        {
        CreateExplosion(0,0,0,0,0);
        }
        else
        {
        SendClientMessage(playerid, COLOR_AQUA,"(!):{FFFFFF}You are not near a field gun");
        }
        return 1;
    }
How I can make this possible? That if the player skin is 111 and the player is in range of point 5, the explosion will appear?
Reply
#2

many errors in this code
pawn Код:
if (strcmp("/blow", cmdtext, true, 10) == 0)
    {
        if(GetPlayerSkin(playerid) == 111 && (IsPlayerInRangeOfPoint(playerid, 3908.1470,-2664.6038,0.8423, 5))
        {
                CreateExplosion(0,0,0,0,0);
        }else return SendClientMessage(playerid, COLOR_AQUA,"(!):{FFFFFF}You are not near a field gun");
        return 1;
    }
Explained
GetPlayerSkin returns the players skinid, but it returns it outside the parameters!
To do a double check you use: &&.
the rest is all fine
Reply
#3

pawn Код:
if (strcmp("/blow", cmdtext, true, 10) == 0)
    {
        if(GetPlayerSkin(playerid) == 111 && (IsPlayerInRangeOfPoint(playerid, 5.0,3908.1470,-2664.6038,0.8423))//5 should be the first
        {
                CreateExplosion(0,0,0,0,0);//0 wont create explosion
        }else return SendClientMessage(playerid, COLOR_AQUA,"(!):{FFFFFF}You are not near a field gun");
        return 1;
    }
Reply
#4

Oh okay! Thanks for replying!
-
Just a quick thing
How to set sea waves?
Reply
#5

Quote:
Originally Posted by Trawltrawl
Посмотреть сообщение
Oh okay! Thanks for replying!
-
Just a quick thing
How to set sea waves?
not possible
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)