Textdraw show for certain skin only
#1

how would i make it so that this textdraw only shows for these skins :
SKINS
pawn Код:
(GetPlayerSkin(playerid) == 280 || GetPlayerSkin(playerid) == 281 || GetPlayerSkin(playerid) == 282 || GetPlayerSkin(playerid) == 283 || GetPlayerSkin(playerid) == 288 || GetPlayerSkin(playerid) == 284 || GetPlayerSkin(playerid) == 285)
TEXTDRAW
pawn Код:
/*
Filterscript generated using Zamaroht's TextDraw Editor Version 1.0.
Designed for SA-MP 0.3a.

Time and Date: 2012-3-23 @ 4:52:13

Instructions:
1- Compile this file using the compiler provided with the sa-mp server package.
2- Copy the .amx file to the filterscripts directory.
3- Add the filterscripts in the server.cfg file (more info here:
https://sampwiki.blast.hk/wiki/Server.cfg)
4- Run the server!

Disclaimer:
You have full rights over this file. You can distribute it, modify it, and
change it as much as you want, without having to give any special credits.
*/


#include <a_samp>

new Text:Textdraw0;

public OnFilterScriptInit()
{
    print("Textdraw file generated by");
    print("    Zamaroht's textdraw editor was loaded.");

    // Create the textdraws:
    Textdraw0 = TextDrawCreate(134.000000, 416.000000, "Why Not Try Undercover Mode Use /CID");
    TextDrawBackgroundColor(Textdraw0, 255);
    TextDrawFont(Textdraw0, 1);
    TextDrawLetterSize(Textdraw0, 0.500000, 1.000000);
    TextDrawColor(Textdraw0, -65281);
    TextDrawSetOutline(Textdraw0, 1);
    TextDrawSetProportional(Textdraw0, 1);

    return 1;
}

public OnFilterScriptExit()
{
    TextDrawHideForAll(Textdraw0);
    TextDrawDestroy(Textdraw0);
    return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
    {
        TextDrawShowForPlayer(playerid, Textdraw0);
    }
    else if(oldstate == PLAYER_STATE_DRIVER || oldstate == PLAYER_STATE_PASSENGER)
    {
        TextDrawHideForPlayer(playerid, Textdraw0);
    }
    return 1;
}
Reply
#2

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
    {
        if(GetPlayerSkin(playerid) == 280 || GetPlayerSkin(playerid) == 281 || GetPlayerSkin(playerid) == 282 || GetPlayerSkin(playerid) == 283 || GetPlayerSkin(playerid) == 288 || GetPlayerSkin(playerid) == 284 || GetPlayerSkin(playerid) == 285)
         {TextDrawShowForPlayer(playerid, Textdraw0);}
    }
    else if(oldstate == PLAYER_STATE_DRIVER || oldstate == PLAYER_STATE_PASSENGER)
    {
        TextDrawHideForPlayer(playerid, Textdraw0);
    }
    return 1;
}
Reply
#3

thanks +rep 4 u
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)