CMD:mytext(playerid, params[]){if(letrehozva[playerid] != 1){new irni[64],Float:x,Float:y,Float:z;format(irni,sizeof(irni),\" %s \",params);GetPlayerPos(playerid,x,y,z);szovege[playerid] = Create3DTextLabel(irni,0xFFFFFFFF,x,y,z,40, GetPlayerVirtualWorld(playerid), 0);Attach3DTextLabelToPlayer(szovege[playerid], playerid, 0.0, 0.0, 0.7);letrehozva[playerid] = 1;SendClientMessage(playerid,-1,\"HASZNÁLAT: /mytext <szöveg>!\");} else { new updated[64]; format(updated,sizeof(updated),\" %s \",params); Update3DTextLabelText(szovege[playerid], 0xFFFFFFFF, updated); SendClientMessage(playerid,-1,\"Sikeresen frissítve!\");}return 1;}CMD:removetext(playerid, params[]){Delete3DTextLabel(szovege[playerid]);SendClientMessage(playerid,-1,\"Sikeresen törölve!\");letrehozva[playerid] = 0;return 1;}
Mi alá ZCMD-s a modom OnPlayerCommandText nincs benne..
new updated[64]; format(updated,sizeof(updated),\"%s\",params); Update3DTextLabelText(szovege[playerid], 0xFFFFFFFF, updated); SendClientMessage(playerid,-1,\"Sikeresen frissítve!\");
#include <a_samp>#include <zcmd>#include <sscanf2>new Text3D:szovege[MAX_PLAYERS];new letrehozva[MAX_PLAYERS];CMD:mytext(playerid, params[]){if(sscanf(params, \"s[104]\", szovege[playerid])) return SendClientMessage(playerid,-1,\"HASZNÁLAT: /mytext <szöveg>!\"); if(letrehozva[playerid] != 1) { szovege[playerid] = Create3DTextLabel(\"Hello, I am new here!\", 0x008080FF, 30.0, 40.0, 50.0, 40.0, 0); Attach3DTextLabelToPlayer(szovege[playerid], playerid, 0.0, 0.0, 0.7); letrehozva[playerid] = 1; } else { new updated[64]; format(updated,sizeof(updated),\"%s\",params); Update3DTextLabelText(szovege[playerid], 0xFFFFFFFF, updated); SendClientMessage(playerid,-1,\"Sikeresen frissítve!\"); } return 1;}
public OnPlayerDisconnect(playerid, reason){ Delete3DTextLabel(szovege[playerid]); letrehozva[playerid] = 0; return 1;}
#include < a_samp >#include < zcmd >#include < sscanf2 >new Text3D: szovege[ MAX_PLAYERS ], pText[ 50 ], Float: fPos[ 3 ];public OnPlayerConnect( playerid ){ SetPVarInt( playerid, \" Text \", 0 ); return 1;}public OnPlayerDisconnect( playerid, reason ){ SetPVarInt( playerid, \" Text \", 0 ); if( GetPVarInt( playerid, \" Text \" ) == 1 ) { Delete3DTextLabel( szovege[ playerid ] ); } return 1;}CMD:mytext(playerid, params[]){ if( GetPVarInt( playerid, \" Text \" ) == 0 ) { if( sscanf( params, \"s[ 50 ]\", pText ) ) return SendClientMessage( playerid, 0xFF0000AA, \" Használat: /mytext <Szöveg> \" );GetPlayerPos( playerid, fPos[ 0 ], fPos[ 1 ], fPos[ 2 ] ); szovege[playerid] = Create3DTextLabel( pText, 0xFFFFFFFF, fPos[ 0 ], fPos[ 1 ], fPos[ 2 ], 40, GetPlayerVirtualWorld( playerid ), 0 ); Attach3DTextLabelToPlayer( szovege[ playerid ], playerid, 0.0, 0.0, 0.7 ); SetPVarInt( playerid, \" Text \", 1 ); } else{ if( sscanf( params, \"s[40] \", pText ) ) return SendClientMessage( playerid, 0xFF0000AA, \" Használat: /mytext <Szöveg> \" ); Update3DTextLabelText( szovege[ playerid ], 0xFFFFFFFF, pText ); } return 1;}CMD:removetext(playerid, params[]){ Delete3DTextLabel( szovege[ playerid ] ); SendClientMessage( playerid, -1, \"Sikeresen törölve!\" ); SetPVarInt( playerid, \" Text \", 1 ); return 1;}