Alles anzeigen...und wenn ich will dass beim connecten der spieler ne zufällige farbe bekommt?
new RandR = random (18);
if(RandR == 1)
{
SetPlayerColor(playerid, GREEN);
{
else if (RandR == 2)
{
SetPlayerColor(playerid, RED);
}
else if (RandR == 3)
{
SetPlayerColor(playerid, ADMIN_RED);
}
else if (RandR == 4)
{
SetPlayerColor(playerid, YELLOW);
}
else if (RandR == 5)
{
SetPlayerColor(playerid, ORANGE);
}
else if (RandR == 6)
{
SetPlayerColor(playerid, LIGHTRED);
}
else if (RandR == 7)
{
SetPlayerColor(playerid, PURPLE);
}
else if (RandR == 8)
{
SetPlayerColor(playerid, BLUE);
}
else if (RandR == 9)
{
SetPlayerColor(playerid, LIGHTGREEN);
}
else if (RandR == 10)
{
SetPlayerColor(playerid, DARKPINK);
}
else if (RandR == 11)
{
SetPlayerColor(playerid, DARKGREEN);
}
else if (RandR == 12)
{
SetPlayerColor(playerid, ANNOUNCEMENT);
}
else if (RandR == 13)
{
SetPlayerColor(playerid, COLOR_SYSTEM);
}
else if (RandR == 14)
{
SetPlayerColor(playerid, NICESKY);
}
else if (RandR == 15)
{
SetPlayerColor(playerid, GRAY);
}
else if (RandR == 16)
{
SetPlayerColor(playerid, testfarbe);
}
else if (RandR == 17)
{
SetPlayerColor(playerid, WHITE);
}
unter OnPlayerConnect eingetragen und das kommt dann:CodeAlles anzeigenC:\SAMP Server\filterscripts\SeifAdmin.pwn(395) : error 029: invalid expression, assumed zero C:\SAMP Server\filterscripts\SeifAdmin.pwn(395) : warning 215: expression has no effect C:\SAMP Server\filterscripts\SeifAdmin.pwn(395) : error 001: expected token: ";", but found "if" C:\SAMP Server\filterscripts\SeifAdmin.pwn(462) : warning 225: unreachable code C:\SAMP Server\filterscripts\SeifAdmin.pwn(462) : error 029: invalid expression, assumed zero C:\SAMP Server\filterscripts\SeifAdmin.pwn(462) : error 004: function "OnPlayerDisconnect" is not implemented C:\SAMP Server\filterscripts\SeifAdmin.pwn(480) : warning 225: unreachable code C:\SAMP Server\filterscripts\SeifAdmin.pwn(480) : error 029: invalid expression, assumed zero C:\SAMP Server\filterscripts\SeifAdmin.pwn(480) : error 004: function "OnPlayerSpawn" is not implemented C:\SAMP Server\filterscripts\SeifAdmin.pwn(485) : warning 225: unreachable code C:\SAMP Server\filterscripts\SeifAdmin.pwn(485) : error 029: invalid expression, assumed zero C:\SAMP Server\filterscripts\SeifAdmin.pwn(485) : error 004: function "OnPlayerDeath" is not implemented C:\SAMP Server\filterscripts\SeifAdmin.pwn(491) : warning 225: unreachable code C:\SAMP Server\filterscripts\SeifAdmin.pwn(491) : error 029: invalid expression, assumed zero C:\SAMP Server\filterscripts\SeifAdmin.pwn(491) : error 004: function "OnVehicleSpawn" is not implemented C:\SAMP Server\filterscripts\SeifAdmin.pwn(496) : warning 225: unreachable code C:\SAMP Server\filterscripts\SeifAdmin.pwn(496) : error 029: invalid expression, assumed zero C:\SAMP Server\filterscripts\SeifAdmin.pwn(496) : error 004: function "OnVehicleDeath" is not implemented C:\SAMP Server\filterscripts\SeifAdmin.pwn(501) : warning 225: unreachable code C:\SAMP Server\filterscripts\SeifAdmin.pwn(501) : error 029: invalid expression, assumed zero C:\SAMP Server\filterscripts\SeifAdmin.pwn(501) : error 004: function "OnPlayerText" is not implemented C:\SAMP Server\filterscripts\SeifAdmin.pwn(505) : warning 219: local variable "string" shadows a variable at a preceding level C:\SAMP Server\filterscripts\SeifAdmin.pwn(508) : error 017: undefined symbol "text" C:\SAMP Server\filterscripts\SeifAdmin.pwn(520) : warning 225: unreachable code C:\SAMP Server\filterscripts\SeifAdmin.pwn(520) : error 029: invalid expression, assumed zero C:\SAMP Server\filterscripts\SeifAdmin.pwn(520) : error 004: function "OnPlayerCommandText" is not implemented C:\SAMP Server\filterscripts\SeifAdmin.pwn(527) : warning 219: local variable "string" shadows a variable at a preceding level C:\SAMP Server\filterscripts\SeifAdmin.pwn(528) : error 017: undefined symbol "cmdtext" C:\SAMP Server\filterscripts\SeifAdmin.pwn(544) : error 017: undefined symbol "cmdtext" C:\SAMP Server\filterscripts\SeifAdmin.pwn(572) : error 017: undefined symbol "cmdtext" C:\SAMP Server\filterscripts\SeifAdmin.pwn(580) : error 017: undefined symbol "cmdtext" C:\SAMP Server\filterscripts\SeifAdmin.pwn(612) : error 017: undefined symbol "cmdtext" C:\SAMP Server\filterscripts\SeifAdmin.pwn(620) : error 017: undefined symbol "cmdtext" C:\SAMP Server\filterscripts\SeifAdmin.pwn(721) : error 017: undefined symbol "cmdtext" C:\SAMP Server\filterscripts\SeifAdmin.pwn(722) : error 017: undefined symbol "cmdtext" C:\SAMP Server\filterscripts\SeifAdmin.pwn(722) : error 029: invalid expression, assumed zero
(wenn ich das mit RandR raus nehme verschwinden alle errors und warnings)
liegt es vllt daran dass ich es in ein filterscript rein schreibe?
MfG
switch *hust*