/alias command - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: /alias command (
/showthread.php?tid=383532)
/alias command -
Rapk1d - 07.10.2012
Someone have /alias command ?
The alias command function:
See how many accounts is made on an ip and listed id.
Something like this :
Код:
dcmd_alias(playerid,params[])
{
if(PlayerInfo[playerid][pAdmin] >= 2)
{
if(!strlen(params))
return SendClientMessage(playerid, COLOR_GREY, "{00A1FF}USAGE{FFFFFF}: /alias [id jucator]");
new player1, playername[MAX_PLAYER_NAME], str[128], tmp3[50];
player1 = strval(params);
if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID)
{
GetPlayerIp(player1,tmp3,50);
GetPlayerName(player1, playername, sizeof(playername));
format(str,sizeof(str),"Aliases for %s (%d) are: %s", playername, player1, dini_Get("users/Aliases/alias.txt",tmp3) );
return SendClientMessage(playerid,COLOR_GREY,str);
}
else return SendClientMessage(playerid, COLOR_GREY, "* Playerul nu este conectat sau esti tu *");
}
else return SendClientMessage(playerid,COLOR_GREY,"* Eroare: Nu ai Admin destul de mare pentru a folosi aceasta comanda");
}
But i don't know how to integrate this script because if i copy/pase this code i have this :
Код:
D:\xg.pwn(35932) : error 017: undefined symbol "dcmd_alias"
D:\xg.pwn(35936) : error 017: undefined symbol "params"
D:\xg.pwn(35939) : warning 219: local variable "playername" shadows a variable at a preceding level
D:\xg.pwn(35940) : error 017: undefined symbol "params"
D:\xg.pwn(35958) : warning 225: unreachable code
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
3 Errors.
Re: /alias command -
Riddick94 - 07.10.2012
You don't have a macro for "dcmd" symbol. Look for it in the code from where you cutted it or in the net.
Re: /alias command -
Joshman543 - 07.10.2012
make sure you have the dcmd include in your pawno folder.
Like ^Riddick Said make sure you do a macro symbol like this:
new dcmd_alias