Megpróbáltam írni egy ilyen gamemodot de még csak készülõ stádiumban van. Azomban a pawn csak warningol (ekkor jó szokott lenni, de most nem jó, nem müködnek a parancsok!)
A warning maga:
C:\\Users\\ptR\\Desktop\\San Andreas MultiPlayer Server\\gamemodes\\ptp.pwn(239) : warning 217: loose indentation
C:\\Users\\ptR\\Desktop\\San Andreas MultiPlayer Server\\gamemodes\\ptp.pwn(252) : warning 217: loose indentation
C:\\Users\\ptR\\Desktop\\San Andreas MultiPlayer Server\\gamemodes\\ptp.pwn(264) : warning 217: loose indentation
C:\\Users\\ptR\\Desktop\\San Andreas MultiPlayer Server\\gamemodes\\ptp.pwn(280) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Warnings.
A hibás sorok:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp(\"/help\", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, 0xAA3333AA, \"********************************\");
SendClientMessage(playerid, 0xFFFFFFAA, \"Ha valamit itt nem találsz meg,\");
SendClientMessage(playerid, 0xFFFFFFAA, \"kérdezz meg egy Admint, õ segít!\");
SendClientMessage(playerid, 0xFFFFFFAA, \"kérdezz meg egy Admint, õ segít!\");
SendClientMessage(playerid, 0xFFFFFFAA, \"/who - megnézheted, hogy kivagy!\");
SendClientMessage(playerid, 0xAA3333AA, \"********************************\");
return 1;
}
if (strcmp(\"/admin\", cmdtext, true, 10) == 0)
{
if(IsPlayerAdmin(playerid)) SendClientMessageToAll(0x33AA33AA, \"Admin szolgatban!\");
else SendClientMessage(playerid, 0xAA3333AA, \"Nem vagy RCON Admin\");
if(IsPlayerAdmin(playerid)) SetPlayerColor(playerid, 0xAA3333AA);
else SetPlayerColor(playerid, 0xFFFF00AA);
if(IsPlayerAdmin(playerid)) SetPlayerSkin(playerid, 217);
else SetPlayerSkin(playerid,78);
return 1;
}
if(strcmp(cmdtext, \"/rendor\", true) == 0) {
SendClientMessage(playerid, 0x33AA33AA, \"Sikeresen szolgálatba álltál!\");
SendClientMessage(playerid, 0xAA3333AA, \"********************************\");
SendClientMessage(playerid, 0xFFFFFFAA, \"Villogó: /villogobe - /villogoki\");
SendClientMessage(playerid, 0xFFFFFFAA, \"Rendõr Rádió: /rr [üzenet]\");
SendClientMessage(playerid, 0xAA3333AA, \"********************************\");
SetPlayerSkin(playerid, 277);
new string[64], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
format(string,sizeof string,\"%s szolgálatba állt!\",pName);
SendClientMessageToAll( 0xFF9900AA,string);
pTeam[playerid] = team_lspd;
// now you can easily know if he is in lspd or not
return 1;
}
if(strcmp(cmdtext, \"/who\", true) == 0) {
if(pTeam[playerid] == team_lspd){ // Check if the player is a lspd officer
SendClientMessage(playerid, 0xFFFFFFAA, \"Te Rendõr vagy!\");
return 1;
}
if(pTeam[playerid] == team_civ){ // Check if the player is a civilian
SendClientMessage(playerid, 0xFFFFFFAA, \"Te egy civil vagy!\");
return 1;
}
return 1;
}
if(strcmp(cmdtext, \"/rr\", true) == 0) {
for(new i=0; i <= MAX_PLAYERS; i++) // Loops through all players
{
if(IsPlayerConnected(i)) // Checks if the player is connected
{
if(pTeam == team_lspd) // Checks if the player is in lspd
{
SendClientMessage(i, COLOR_YELLOW, \"Üzenet elküldve!\");
}
}
}
return 1;
}
return 0;
}
Nem tudom mivan, kicseréltem de nem jó:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, \"/help\", true))
{
SendClientMessage(playerid, 0xAA3333AA, \"********************************\");
SendClientMessage(playerid, 0xFFFFFFAA, \"Ha valamit itt nem találsz meg,\");
SendClientMessage(playerid, 0xFFFFFFAA, \"kérdezz meg egy Admint, õ segít!\");
SendClientMessage(playerid, 0xFFFFFFAA, \"kérdezz meg egy Admint, õ segít!\");
SendClientMessage(playerid, 0xFFFFFFAA, \"/who - megnézheted, hogy kivagy!\");
SendClientMessage(playerid, 0xAA3333AA, \"********************************\");
return 1;
}
if(!strcmp(cmdtext, \"/admin\", true))
{
if(IsPlayerAdmin(playerid)) SendClientMessageToAll(0x33AA33AA, \"Admin szolgatban!\");
else SendClientMessage(playerid, 0xAA3333AA, \"Nem vagy RCON Admin\");
if(IsPlayerAdmin(playerid)) SetPlayerColor(playerid, 0xAA3333AA);
else SetPlayerColor(playerid, 0xFFFF00AA);
if(IsPlayerAdmin(playerid)) SetPlayerSkin(playerid, 217);
else SetPlayerSkin(playerid,78);
return 1;
}
if(!strcmp(cmdtext, \"/rendor\", true))
SendClientMessage(playerid, 0x33AA33AA, \"Sikeresen szolgálatba álltál!\");
SendClientMessage(playerid, 0xAA3333AA, \"********************************\");
SendClientMessage(playerid, 0xFFFFFFAA, \"Villogó: /villogobe - /villogoki\");
SendClientMessage(playerid, 0xFFFFFFAA, \"Rendõr Rádió: /rr [üzenet]\");
SendClientMessage(playerid, 0xAA3333AA, \"********************************\");
SetPlayerSkin(playerid, 277);
new string[64], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
format(string,sizeof string,\"%s szolgálatba állt!\",pName);
SendClientMessageToAll( 0xFF9900AA,string);
pTeam[playerid] = team_lspd;
return 1;
}
if(!strcmp(cmdtext, \"/who\", true))
if(pTeam[playerid] == team_lspd){ // Check if the player is a lspd officer
SendClientMessage(playerid, 0xFFFFFFAA, \"Te Rendõr vagy!\");
return 1;
}
if(pTeam[playerid] == team_civ){ // Check if the player is a civilian
SendClientMessage(playerid, 0xFFFFFFAA, \"Te egy civil vagy!\");
return 1;
}
return 1;
}
if(!strcmp(cmdtext, \"/rr\", true))
for(new i=0; i <= MAX_PLAYERS; i++) // Loops through all players
{
if(IsPlayerConnected(i)) // Checks if the player is connected
{
if(pTeam == team_lspd) // Checks if the player is in lspd
{
SendClientMessage(i, COLOR_YELLOW, \"Üzenet elküldve!\");
}
}
}
return 1;
}
return 0;
}