All pastes #633092 Raw Edit

Stuff

public text v1 · immutable
#633092 ·published 2007-07-25 13:28 UTC
rendered paste body
new Text:textdraw1;
new Text:textdraw2;

new Variable1[MAX_PLAYERS];
new Variable2[MAX_PLAYERS];

stock ShowTD(playerid){
new string[256];
TextDrawDestroy(textdraw2);
TextDrawDestroy(textdraw1);

format(string,sizeof(string),"Variable 1: %d",Variable1[playerid]);
textdraw2=TextDrawCreate(500,100,string);
TextDrawLetterSize(textdraw2,0.3,1.08);
TextDrawFont(textdraw2,3);
TextDrawSetOutline(textdraw2,2);

switch(Variable2[playerid]) {
case 0: { textdraw1=TextDrawCreate(500,114,"Variable 2: Test1");}
case 1: { textdraw1=TextDrawCreate(500,114,"Variable 2: Test2");}
case 2: { textdraw1=TextDrawCreate(500,114,"Variable 2: Test3");}
case 3: { textdraw1=TextDrawCreate(500,114,"Variable 2: Test4");}}
TextDrawLetterSize(textdraw1,0.3,1.08);
TextDrawFont(textdraw1,3);
TextDrawSetOutline(textdraw1,2);

TextDrawShowForPlayer(playerid, textdraw2);
TextDrawShowForPlayer(playerid, textdraw1);
}

public OnPlayerCommandText(playerid, cmdtext[]){
    new cmd[256];
    new idx;

    cmd = strtok(cmdtext, idx);

    if(strcmp(cmd, "/td", true) == 0) {
    ShowTD(playerid);
    return 1;
    }

return 0;
}