new prefix[MAX_PLAYERS];
new customprefix[256]; new customprefixplayer[MAX_PLAYER_NAME]; GetPlayerName(playerid, customprefixplayer, sizeof(customprefixplayer)); format(customprefix, sizeof(customprefix), "{b800db}[{ffffff}%s{b800db}]{940000}%s: {ffffff}%s", prefix, customprefixplayer, text); SendClientMessageToAll(GetPlayerColor(playerid), customprefix);
new tag[16]; if(sscanf(params,"s[16]",tag)) return SendClientMessage(playerid, WHITE, "USAGE:/setmyprefix [text]"); format(prefix, sizeof(prefix), tag, prefix); return 1;
new prefix[MAX_PLAYERS][16];
new tag[16]; if(sscanf(params,"s[16]",tag)) return SendClientMessage(playerid, WHITE, "USAGE:/setmyprefix [text]"); format(prefix[playerid], sizeof(prefix[playerid]), "%s", tag); return 1;
new customprefix[256]; new customprefixplayer[MAX_PLAYER_NAME]; GetPlayerName(playerid, customprefixplayer, sizeof(customprefixplayer)); format(customprefix, sizeof(customprefix), "{b800db}[{ffffff}%s{b800db}]{940000}%s: {ffffff}%s", prefix[playerid], customprefixplayer, text); SendClientMessageToAll(GetPlayerColor(playerid), customprefix);
D:\Samp Server\gamemodes\ServerFile.pwn(7811) : error 001: expected token: "]", but found "-identifier-" D:\Samp Server\gamemodes\ServerFile.pwn(7811) : warning 215: expression has no effect D:\Samp Server\gamemodes\ServerFile.pwn(7811) : error 001: expected token: ";", but found "]" D:\Samp Server\gamemodes\ServerFile.pwn(7811) : error 029: invalid expression, assumed zero D:\Samp Server\gamemodes\ServerFile.pwn(7811) : fatal error 107: too many error messages on one line
format(prefix[playerid], sizeof(prefix[playerid]), "%s", tag);
format(prefix[playerid], sizeof(tag), "%s", tag);
But with SetPlayerName will write the prefix and the player name in the file? or?
|
new name[MAX_PLAYER_NAME];
new string[24];
GetPlayerName(playerid,name,sizeof(name));
format(string,sizeof(string),"%s%s",name,prefix);
SetPlayerName(playerid,string);