SA-MP Forums Archive
trans fs into gm - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: trans fs into gm (/showthread.php?tid=324593)



trans fs into gm - N0FeaR - 10.03.2012

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

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


Re: trans fs into gm - dud - 10.03.2012

i can help you pm me


Re: trans fs into gm - N0FeaR - 10.03.2012

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


Re: trans fs into gm - Rac3r - 10.03.2012

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.


Re: trans fs into gm - GNGification - 10.03.2012

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


Re: trans fs into gm - N0FeaR - 10.03.2012

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