if (strcmp("/myinfo", cmdtext, true, 10) == 0)
{
new string[256];
SendClientMessage(playerid,COLOR_GREEN,"============================== My User Information ===========================================");
format(string, sizeof(string),"[Name]%s(%d): Level[%d] - Bank[%d] - Money[%d] - Exp[%d] ",PlayerName(playerid),playerid,PlayerInfo[playerid][Level],PlayerInfo[playerid][pBankAccount],PlayerInfo[playerid][pCash],PlayerInfo[playerid][Exp]);
format(string, sizeof(string),"Kills[%d] - Deaths[%d] - Adminlevel[%d] ",PlayerInfo[playerid][pKills],PlayerInfo[playerid][pDeaths],PlayerInfo[playerid][pAdmin]);
SendClientMessage(playerid,COLOR_GREEN,"==============================================================================================");
}
Add SendClientMessage(playerid, string); under the second format line
|
C:\Users\User\Desktop\samp03e_svr_R2_win32 (3)\gamemodes\Anthony.pwn(308) : error 035: argument type mismatch (argument 2) Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
if (strcmp("/myinfo", cmdtext, true, 10) == 0)
{
new string[256];
SendClientMessage(playerid,COLOR_GREEN,"============================== My User Information ===========================================");
format(string, sizeof(string),"[Name]%s(%d): Level[%d] - Bank[%d] - Money[%d] - Exp[%d] ",PlayerName(playerid),playerid,PlayerInfo[playerid][Level],PlayerInfo[playerid][pBankAccount],PlayerInfo[playerid][pCash],PlayerInfo[playerid][Exp]);
SendClientMessage(playerid, -1, string);
format(string, sizeof(string),"Kills[%d] - Deaths[%d] - Adminlevel[%d] ",PlayerInfo[playerid][pKills],PlayerInfo[playerid][pDeaths],PlayerInfo[playerid][pAdmin]);
SendClientMessage(playerid, -1, string);
SendClientMessage(playerid,COLOR_GREEN,"==============================================================================================");
}
if (strcmp("/myinfo", cmdtext, true, 10) == 0)
{
new string[256];
new string2[256];
SendClientMessage(playerid,COLOR_GREEN,"============================== My User Information ===========================================");
format(string, sizeof(string),"[Name]%s(%d): Level[%d] - Bank[%d] - Money[%d] - Exp[%d] ",PlayerName(playerid),playerid,PlayerInfo[playerid][Level],PlayerInfo[playerid][pBankAccount],PlayerInfo[playerid][pCash],PlayerInfo[playerid][Exp]);
format(string2, sizeof(string2),"Kills[%d] - Deaths[%d] - Adminlevel[%d] ",PlayerInfo[playerid][pKills],PlayerInfo[playerid][pDeaths],PlayerInfo[playerid][pAdmin]);
SendClientMessage(playerid, COLOR_GREEN, string);
SendClientMessage(playerid, COLOR_GREEN, string);
SendClientMessage(playerid,COLOR_GREEN,"==============================================================================================");
}
Try this
pawn Код:
And thats why the message didn't come. Edit:Aww I'm late Mobile scripting is too slow.. |
if (strcmp("/myinfo", cmdtext, true, 10) == 0)
{
new string[256];
SendClientMessage(playerid,COLOR_GREEN,"============================== My User Information ===========================================");
format(string, sizeof(string),"[Name]%s(%d): Level[%d] - Bank[%d] - Money[%d] - Exp[%d] ",PlayerName(playerid),playerid,PlayerInfo[playerid][Level],PlayerInfo[playerid][pBankAccount],PlayerInfo[playerid][pCash],PlayerInfo[playerid][Exp]);
format(string, sizeof(string),"Kills[%d] - Deaths[%d] - Adminlevel[%d] ",PlayerInfo[playerid][pKills],PlayerInfo[playerid][pDeaths],PlayerInfo[playerid][pAdmin]);
SendClientMessage(playerid, -1, string);
SendClientMessage(playerid,COLOR_GREEN,"==============================================================================================");
}
format(string, sizeof(string),"Kills[%d] - Deaths[%d] - Adminlevel[%d] ",PlayerInfo[playerid][pKills],PlayerInfo[playerid][pDeaths],PlayerInfo[playerid][pAdmin]);
pawn Код:
You ONLY formatted the strings but never sent it to the player. (Keep in mind "format" is only used for manipulating strings, not for sending them..) |