Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <sscanf2>
- #include <zcmd>
- #include <streamer>
- #define COLOR_ME 0xC2A2DAFF
- #define COLOR_ERROR 0xFF0000FF
- new Text3D:ame[MAX_PLAYERS];
- new Text3D:ado[MAX_PLAYERS];
- new amestatus[MAX_PLAYERS], adostatus[MAX_PLAYERS];
- public OnFilterScriptInit()
- {
- print("\n-----------------------------------------------");
- print(" AME and ADO Filterscript by IceMeteor - Ravian ");
- print("-----------------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- DestroyDynamic3DTextLabel(ado[playerid]);
- DestroyDynamic3DTextLabel(ame[playerid]);
- amestatus[playerid] = 0;
- adostatus[playerid] = 0;
- return 1;
- }
- GetRPName(playerid)
- {
- new RPName[MAX_PLAYER_NAME], i_pos;
- GetPlayerName(playerid, RPName, MAX_PLAYER_NAME);
- while ((i_pos = strfind(RPName, "_", false, i_pos)) != -1) RPName[i_pos] = ' ';
- return RPName;
- }
- CMD:ame(playerid, params[])
- {
- new result[100], string[140];
- if(sscanf(params, "s[100]", result))
- {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE:{FFFFFF} /ame [description] - This text will show up above your head.");
- SendClientMessage(playerid, COLOR_ERROR, "HINT:{FFFFFF} Use (/ame off) to remove the text!");
- return 1;
- }
- if(strlen(result) >100) return SendClientMessage(playerid, COLOR_ERROR, "The description shouldn't more than 100 character!");
- if(strcmp(result, "off", true) == 0)
- {
- if(amestatus[playerid] == 0) return SendClientMessage(playerid, COLOR_ERROR, "You don't have any ame attached!");
- DestroyDynamic3DTextLabel(ame[playerid]);
- SendClientMessage(playerid, COLOR_ME, "AME deleted!");
- amestatus[playerid] = 0;
- return 1;
- }
- if(amestatus[playerid] == 0)
- {
- format(string, sizeof(string), "* %s %s *", GetRPName(playerid), result);
- ame[playerid] = CreateDynamic3DTextLabel(string, COLOR_ME, 0.0, 0.0, 0.0, 40.0, playerid);
- format(string, sizeof(string), "AME >> %s", string);
- SendClientMessage(playerid, COLOR_ME, "You have attached an AME above your head!");
- SendClientMessage(playerid, COLOR_ME, string);
- amestatus[playerid] = 1;
- }
- else
- {
- format(string, sizeof(string), "* %s %s *", GetRPName(playerid), result);
- UpdateDynamic3DTextLabelText(ame[playerid], COLOR_ME, string);
- format(string, sizeof(string), "AME Update Success! >> %s", string);
- SendClientMessage(playerid, COLOR_ME, string);
- return 1;
- }
- return 1;
- }
- CMD:ado(playerid, params[])
- {
- new result[100], string[140];
- if(sscanf(params, "s[200]", result))
- {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE:{FFFFFF} /ado [description] - This text will stay on your current place.");
- SendClientMessage(playerid, COLOR_ERROR, "HINT:{FFFFFF} Use (/ado off) to remove the text!");
- return 1;
- }
- if(strlen(result) >100) return SendClientMessage(playerid, COLOR_ERROR, "The description shouldn't more than 100 character!");
- if(strcmp(result, "off", true) == 0)
- {
- if(adostatus[playerid] == 0) return SendClientMessage(playerid, COLOR_ERROR, "You don't have any ado attached!");
- DestroyDynamic3DTextLabel(ado[playerid]);
- SendClientMessage(playerid, COLOR_ME, "ADO deleted!");
- adostatus[playerid] = 0;
- return 1;
- }
- if(adostatus[playerid] == 0)
- {
- new Float:AdoX, Float:AdoY, Float:AdoZ;
- GetPlayerPos(playerid, AdoX, AdoY, AdoZ);
- format(string, sizeof(string), "* %s *\n(( %s ))", result, GetRPName(playerid));
- ado[playerid] = CreateDynamic3DTextLabel(string, COLOR_ME, AdoX, AdoY, AdoZ, 40.0);
- SendClientMessage(playerid, COLOR_ME, "You have attached an ADO at your current place!");
- adostatus[playerid] = 1;
- }
- else
- {
- format(string, sizeof(string), "* %s *\n(( %s ))", result, GetRPName(playerid));
- UpdateDynamic3DTextLabelText(ado[playerid], COLOR_ME, string);
- SendClientMessage(playerid, COLOR_ME, "ADO Update Success!");
- return 1;
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement