Rarely helps
#1

How to create a script that will giveplayerid ?

Like when someone has message'd something , then on chatbox it will come like this

SliceOfDeath [0] (Since 0 will be my id) : Hello

instead of SliceOfDeath : Hello

...........


And this error coming from one script

Код:
E:\games\server\EF Server\filterscripts\cmds.pwn(73 -- 74) : error 001: expected token: ",", but found "}"
E:\games\server\EF Server\filterscripts\cmds.pwn(81) : warning 217: loose indentation
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
FS -

pawn Код:
#include <a_samp>
//----------------->
new LongDialog [ 1024 ];//long dialog
//----------------->

SetUpMyText()
{
    LongDialog = "EF Server - Commands\n";//
    strcat(LongDialog, "/V - to spawn own vehicle\n");
    strcat(LongDialog, "/VCOLOR -  to change your vehicle color\n");
    strcat(LongDialog, "/RECLASS - to goto skin selection menu\n");
    strcat(LongDialog, "/GIVECASH - to give a player money\n");
    strcat(LongDialog, "/FLIP - to flip your car\n");
    strcat(LongDialog, "/AOE - to attach an object\n");
    strcat(LongDialog, "/TOW - to tow a nearby car\n");
    strcat(LongDialog, "/CHANGEVIEW - to change view in car\n");
    strcat(LongDialog, "/COLOR - to change your name color [RGB]\n");
    strcat(LongDialog, "/SUGGEST - to make an suggestion\n");
    strcat(LongDialog, "/NEWS - to know new in server\n");
    strcat(LongDialog, "/W - to view weapon menu\n");
    strcat(LongDialog, "/SSB - to set speedboost\n");
    strcat(LongDialog, "/LOGIN - to login to your account\n");
    strcat(LongDialog, "/REGISTER - to register an account\n");
    strcat(LongDialog, "/LOGOUT - to logout your account\n");
    strcat(LongDialog, "/RELOG - to relogin your account\n");
    strcat(LongDialog, "/T - to see teleports of server\n");
    strcat(LongDialog, "/HEADMOVE - to on/off headmove of the player\n");
    strcat(LongDialog, "/SKIN - to select your skin\n");
    strcat(LongDialog, "/GOTO - to teleport to a player by /Goto [player id]\n");
    strcat(LongDialog, "/LASERON - to turn on laser\n");
    strcat(LongDialog, "/LASERCOL - to select laser color\n");
    strcat(LongDialog, "/LASEROFF - to turn off laser\n");
    strcat(LongDialog, "/NEON - to get a neon in car\n");
    strcat(LongDialog, "/ADMINS - to see online Admins\n");
    strcat(LongDialog, "/VIPS - to see online VIPS\n");
    strcat(LongDialog, "/STATS - to see your stats\n");
    strcat(LongDialog, "/PM - to private message someone\n");
    strcat(LongDialog, "/R - to reply your last pm\n");
    strcat(LongDialog, "/BLOCKPM - to turn off private message\n");
    strcat(LongDialog, "/REPORT - to report an hacker to admin\n");
    strcat(LongDialog, "/AFK - to go AFK\n");
    strcat(LongDialog, "/AFKLIST - to see AFK players\n");
    strcat(LongDialog, "/CHANGEPASS - to change account password\n");
    strcat(LongDialog, "/DUEL - to send a player duel (Challenge)\n");
    strcat(LongDialog, "/ACCEPT - to accept duel\n");
    strcat(LongDialog, "/DENIED - to denied duel\n");
    strcat(LongDialog, "/SAVESTATS - to save stats\n");
    strcat(LongDialog, "/REPLY - to reply your last pm\n");
    return 1;
}

public OnGameModeInit()
{
    SetUpMyText();
}
   
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/cmds", cmdtext, true, 10) == 0)
    {
        ShowPlayerDialog(playerid, 300, DIALOG_STYLE_MSGBOX,"{0099B7}EF Server - Commands",LongDialog,"OK", "");
        return 1;
    }
    return 0;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 300)
{
if(response) // if the clicked the ok button
{
ShowPlayerDialog(playerid, 301 // the next dialog of your /cmds, DIALOG_STYLE_MSGBOX, "header", "text", "another ok", " ");
}
else //if the hit esc
{
SendClientMessage(playerid, -1, "u don't want to see more cmds");
}
return 1;
}
    return 0;
}
Reply
#2

I just created 1st one.

But the problem is -

Reply
#3

You could've found how to do it if you searched for it.

pawn Код:
public OnPlayerText( playerid, text[ ] )
{
    new
        msg[ 128 ]
    ;
    format( msg, sizeof( msg ), "[%d] : %s", playerid, text );
    SendPlayerMessageToAll( playerid, msg );
    return 0;
}
Reply
#4

And cmd dialog ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)