trans fs into gm
#1

Hey there can anyone tell me how to trans a fs into to the gm

this fs i want trans http://pastebin.com/LthJgaFc.
Reply
#2

i can help you pm me
Reply
#3

Quote:
Originally Posted by dud
Посмотреть сообщение
i can help you pm me
I PM you but you not respond, mabye someone else can help?
Reply
#4

OnFilterscriptInit and Exit code needs to go in your OnGameModeInit and Exit code.

Find other callbacks (SA-MP Default Callbacks) like OnPlayerUpdate, Connect & Disconnect, place this code in your gamemode callbacks.

All vars (new This go at the top of your script, any custom functions (CheckMoney), place at the bottom of your script.

It's quite easy to use FS/INC code in your gamemode, just use common sense and you'll be flying high.
Reply
#5

This on top of your script:

Код:
new Text:Cash[MAX_PLAYERS];
new Text:Dollar;
new Check;
This under OnGameModeInIt

Код:
Dollar = TextDrawCreate(499.000000, 78.000000, "~b~$");
TextDrawBackgroundColor(Dollar, 255);
TextDrawFont(Dollar, 3);
TextDrawLetterSize(Dollar, 0.539999, 2.000000);
TextDrawColor(Dollar, 945269247);
TextDrawSetOutline(Dollar, 0);
TextDrawSetProportional(Dollar, 1);
TextDrawSetShadow(Dollar, 1);
return 1;
}
This under OnGameModeExit

Код:
KillTimer(Check);
Under OnPlayerConnect
Код:
    Cash[playerid] = TextDrawCreate(511.500000, 78.000000, "00000000");
    TextDrawBackgroundColor(Cash[playerid], 255);
    TextDrawFont(Cash[playerid], 3);
    TextDrawLetterSize(Cash[playerid], 0.599999, 2.000000);
    TextDrawSetOutline(Cash[playerid], 0);
    TextDrawSetProportional(Cash[playerid], 1);
    TextDrawSetShadow(Cash[playerid], 1);
    SetTimerEx("CheckMoney", 2000, true, "i", playerid);
    TextDrawShowForPlayer(playerid, Dollar);
    return 1;
}
under OnPlayerDisconnect
Код:
    TextDrawHideForPlayer(playerid, Cash[playerid]);
    TextDrawHideForPlayer(playerid, Dollar);
    return 1;
}
under OnPlayerUpdate
Код:
SetTimerEx("CheckMoney", 2000, true, "i", playerid);
and under everything in your script

Код:
forward CheckMoney(playerid);
public CheckMoney(playerid)
{
    new string[128];
    format(string, sizeof(string), "~w~%08d", GetPlayerMoney(playerid));
    TextDrawSetString(Cash[playerid], string);
    TextDrawShowForPlayer(playerid, Cash[playerid]);
    return 1;
}
If this did help you I would like to have rep from you =)
also if need more help, ask
Reply
#6

I will try this thank you and i will rep you if this works
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)