Creating a Textdraw on PlayerRequestClass
#3

pawn Code:
public OnGameModeInit()
{
    AddPlayerClass(0, 1958.33, 1343.12, 15.36, 269.15, 26, 36, 28, 150, 0, 0); //Civilian - classid = 0
    AddPlayerClass(1, 1958.33, 1343.12, 15.36, 269.15, 26, 36, 28, 150, 0, 0); //Mafia - classid = 1
    return 1;
}
public OnPlayerRequestClass(playerid,classid)
{
     //Create the TextDraw on OnPlayerConnect.
    //---
    if(classid == 0)
    {
        TextDrawSetString(TextDrawName, "Civilian");
    }
    else if(classid == 1)
    {
        TextDrawSetString(TextDrawName, "Mafia");
    }
    TextDrawShowForPlayer(playerid, TextDrawName);
    return 1;
}
public OnPlayerRequestSpawn(playerid)
{
    TextDrawHideForPlayer(playerid, TextDrawName);
    return 1;
}
Reply


Messages In This Thread
Creating a Textdraw on PlayerRequestClass - by HazardGaming - 08.04.2012, 14:26
Re: Creating a Textdraw on PlayerRequestClass - by SpiritEvil - 08.04.2012, 14:33
Re: Creating a Textdraw on PlayerRequestClass - by [DOG]irinel1996 - 08.04.2012, 14:34

Forum Jump:


Users browsing this thread: 1 Guest(s)