Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ////////////////////////////////////////////////////////////////////////////////
- ////////////////////////////////////////////////////////////////////////////////
- // BLACK DONELLY CLASS SELECTION CREATOR VERSÃO ZCMD 18/07/2012
- ////////////////////////////////////////////////////////////////////////////////
- ////////////////////////////////////////////////////////////////////////////////
- #include <a_samp>
- #include <zcmd>
- #include <sscanf2>
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" LACK DONELLY CLASS SELECTION CREATOR CARREGADO!");
- print("--------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- print("\n--------------------------------------");
- print(" LACK DONELLY CLASS SELECTION CREATOR DESCARREGADO!");
- print("--------------------------------------\n");
- return 1;
- }
- public OnPlayerCommandPerformed(playerid, cmdtext[], success)
- {
- return 1;
- }
- CMD:scs(playerid,params[])
- {
- static Float:pPos[6],string[320],distancia;
- if(sscanf(params,"d",distancia)) return SendClientMessage(playerid,-1,"USO: /scs [disctância entre 2 e 8]");
- GetPlayerPos(playerid,pPos[0],pPos[1],pPos[2]);
- GetPlayerFacingAngle(playerid,pPos[3]);
- GetXYInFrontOfPlayer(playerid, pPos[4], pPos[5], distancia);
- new File:filex = fopen("ClassPosions.txt", io_append);
- fwrite(filex,"//=============================================================== \r\n");
- fwrite(filex,"NA PUBLIC OnPlayerRequestClass COLE ISTO:\r\n");
- fwrite(filex,"//\r\n");
- format(string,sizeof(string),"SetPlayerPos(playerid, %f, %f, %f);\r\n",pPos[0],pPos[1],pPos[2]);
- fwrite(filex,string);
- format(string,sizeof(string),"SetPlayerCameraPos(playerid, %f, %f, %f);\r\n",pPos[4],pPos[5],pPos[2]);
- fwrite(filex,string);
- format(string,sizeof(string),"SetPlayerCameraLookAt(playerid, %f, %f, %f);\r\n",pPos[0],pPos[1],pPos[2]);
- fwrite(filex,string);
- format(string,sizeof(string),"SetPlayerFacingAngle(playerid, %f);\r\n",pPos[3]);
- fwrite(filex,string);
- if(GetPlayerInterior(playerid) != 0)
- {
- format(string,sizeof(string),"SetPlayerInterior(playerid,%d);\r\n",GetPlayerInterior(playerid));
- fwrite(filex,string);
- }
- fclose(filex);
- SendClientMessage(playerid,0x0080C0AA," ");
- SendClientMessage(playerid,0x0080C0AA,"|| Sua seleção de classe foi salva em 'ClassPosions.txt' na pasta scriptfiles ||");
- SendClientMessage(playerid,0x0080C0AA," ");
- return 1;
- }
- GetXYInFrontOfPlayer(playerid, &Float:x, &Float:y, Float:distance)
- {
- new Float:a;
- GetPlayerPos(playerid, x, y, a);
- GetPlayerFacingAngle(playerid, a);
- if (GetPlayerVehicleID(playerid))
- {
- GetVehicleZAngle(GetPlayerVehicleID(playerid), a);
- }
- x += (distance * floatsin(-a, degrees));
- y += (distance * floatcos(-a, degrees));
- }
Advertisement
Add Comment
Please, Sign In to add comment