Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*==============================================================================
- _ ____ _____ __ __
- (_) _ \ ___ |_ _|__ __ _| \/ |
- | | |_) / __| | |/ _ \/ _` | |\/| |
- | | __/\__ \ | | __/ (_| | | | |
- |_|_| |___/ |_|\___|\__,_|_| |_|
- [iPs] Show Pos
- Criado por: Crush
- Versão 0.1
- ==============================================================================*/
- #include a_samp
- new
- Text:iShowPos[MAX_PLAYERS],
- bool:bShow[MAX_PLAYERS];
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (!strcmp("/coord", cmdtext, true) )
- {
- iShowPos[playerid] = TextDrawCreate(313-135, 344,"Carregando");
- TextDrawShowForPlayer(playerid,iShowPos[playerid]);
- bShow[playerid] = true;
- return true;
- }
- if (!strcmp("/coordoff", cmdtext, true))
- {
- bShow[playerid] = false;
- TextDrawHideForPlayer(playerid,iShowPos[playerid]);
- TextDrawDestroy(iShowPos[playerid]);
- return true;
- }
- return false;
- }
- public OnPlayerUpdate(playerid)
- {
- if(bShow[playerid]) {
- static
- sStr[128],
- Float:xPos,
- Float:yPos,
- Float:zPos;
- GetPlayerPos(playerid, xPos, yPos, zPos);
- format(sStr,128, "%f, %f, %f", xPos, yPos, zPos);
- TextDrawSetString(iShowPos[playerid], sStr);
- TextDrawShowForPlayer(playerid, iShowPos[playerid]);
- }
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement