Hi, Breadfish.
Da ich nicht richtig weiß, wie man einen /l Chat macht, hab ich das ausm LoH kopiert.
Habe ganz unten auch strget definiert oder wie mans nennt.
Also, hier mal mein "Script":
public OnPlayerCommandText(playerid, cmdtext[])
{
//========Local-Chat========//
if(strcmp(cmdtext, "/local", true) == 0 || strcmp(cmdtext, "/l", true) == 0 || strcmp(cmdtext, "/say", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pTot] == 1)
{
SendClientMessage(playerid, COLOR_WHITE, "Tote können nicht Reden!");
return 0;
}
if(Spieler[playerid][eingeloggt] = 0)
{
SendClientMessage(playerid, COLOR_GREY, " Du bist noch nicht eingeloggt!");
return 1;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_FADE2, "FEHLER: (/l)ocal [local chat]");
return 1;
}
format(string, sizeof(string), "%s sagt: %s", sendername, result);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
printf("%s", string);
}
return 1;
}
//==========================//
return 1;
//==Dadrunter sind eig. noch andere Codes wollte es aber übersichtlich machen. ^^ ==//
Dann hier mal meine Errors & Warnings:
D:\SA-MP Server Sachen\Selfmade\gamemodes\Textdraw.pwn(485) : warning 211: possibly unintended assignment
D:\SA-MP Server Sachen\Selfmade\gamemodes\Textdraw.pwn(492) : error 017: undefined symbol "idx"
D:\SA-MP Server Sachen\Selfmade\gamemodes\Textdraw.pwn(494) : error 017: undefined symbol "idx"
D:\SA-MP Server Sachen\Selfmade\gamemodes\Textdraw.pwn(494) : warning 215: expression has no effect
D:\SA-MP Server Sachen\Selfmade\gamemodes\Textdraw.pwn(496) : error 017: undefined symbol "idx"
D:\SA-MP Server Sachen\Selfmade\gamemodes\Textdraw.pwn(498) : error 017: undefined symbol "idx"
D:\SA-MP Server Sachen\Selfmade\gamemodes\Textdraw.pwn(500) : error 017: undefined symbol "idx"
D:\SA-MP Server Sachen\Selfmade\gamemodes\Textdraw.pwn(501) : error 017: undefined symbol "idx"
D:\SA-MP Server Sachen\Selfmade\gamemodes\Textdraw.pwn(501) : warning 215: expression has no effect
D:\SA-MP Server Sachen\Selfmade\gamemodes\Textdraw.pwn(503) : error 017: undefined symbol "idx"
D:\SA-MP Server Sachen\Selfmade\gamemodes\Textdraw.pwn(509) : error 017: undefined symbol "string"
D:\SA-MP Server Sachen\Selfmade\gamemodes\Textdraw.pwn(509) : error 017: undefined symbol "string"
D:\SA-MP Server Sachen\Selfmade\gamemodes\Textdraw.pwn(509) : error 029: invalid expression, assumed zero
D:\SA-MP Server Sachen\Selfmade\gamemodes\Textdraw.pwn(509) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
11 Errors.
Bitte helft mir mal. <.<