Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <zcmd>
- #include <YSI/y_timers>
- // TalkStyle
- new pTalkStyle[MAX_PLAYERS];
- new Timer: pStopTalking[MAX_PLAYERS];
- // TalkStyleTimer
- timer StopTalking[1000](playerid)
- {
- ApplyAnimation(playerid, "CARRY", "crry_prtial", 4.0, 0, 0, 0, 0, 0);
- return 1;
- }
- main()
- {
- print(" prompted ");
- }
- public OnGameModeInit()
- {
- SetGameModeText("Blank Script");
- AddPlayerClass(299, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- return 1;
- }
- public OnGameModeExit()
- {
- return 1;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- SpawnPlayer(playerid);
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- stop pStopTalking[playerid];
- return 1;
- }
- public OnPlayerText(playerid, text[])
- {
- stop pStopTalking[playerid];
- new talkingtime = strlen(text) * 80;
- switch(pTalkStyle[playerid]) {
- case 1: {
- ApplyAnimation(playerid, "PED", "IDLE_CHAT", 4.1, 1, 1, 1, 1, 1);
- pStopTalking[playerid] = defer StopTalking[talkingtime](playerid);
- }
- case 2: {
- ApplyAnimation(playerid, "GHANDS", "gsign4", 4.1, 1, 1, 1, 1, 1);
- pStopTalking[playerid] = defer StopTalking[talkingtime](playerid);
- }
- case 3: {
- ApplyAnimation(playerid, "GHANDS", "gsign5", 4.1, 1, 1, 1, 1, 1);
- pStopTalking[playerid] = defer StopTalking[talkingtime](playerid);
- }
- default: {
- // Do nothing
- }
- }
- return 1;
- }
- command(settalkingstyle, playerid, params[]) {
- new
- val = strval(params);
- if(val <= 0 || val > 3)
- return SendClientMessage(playerid, -1, " /settalkingstyle [1-3] ");
- pTalkStyle[playerid] = val;
- new string[64];
- format(string, sizeof(string), " Postavili ste chat style %d!", val);
- SendClientMessage(playerid, -1, string);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement