06.04.2013, 10:18
Hey, ik heb een (noob) vraag,
Ik heb mn DM gamemode hervat, en ik maakte een paar commands.
De compiler geeft geen errors aan, maar als ik in game ga en een van de commands typ, staat er unknown command.
Ik heb hier de code:
Weet iemand het probleem? Alvast bedankt!
Ik heb mn DM gamemode hervat, en ik maakte een paar commands.
De compiler geeft geen errors aan, maar als ik in game ga en een van de commands typ, staat er unknown command.
Ik heb hier de code:
pawn Code:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/help", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, COLOR_ORANGE, "This is a deathmatch server, this means you have to kill everybody who is in your way!");
SendClientMessage(playerid, COLOR_ORANGE, "Typ /commands if you want to know all the commands!");
SendClientMessage(playerid, COLOR_ORANGE, "Read the /rules before you start playing!");
return 1;
}
if (strcmp("/rules", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, COLOR_ORANGE, "|=======================================RULES==============================|");
SendClientMessage(playerid, COLOR_ORANGE, "This is a deathmatch server, its means you have to kill everyone in your way!");
SendClientMessage(playerid, COLOR_ORANGE, "Do not hack, it is strictly forbidden and result in a permanent ban!");
SendClientMessage(playerid, COLOR_ORANGE, "Do not insult other players, it is forbidden and result in a punishment!");
SendClientMessage(playerid, COLOR_ORANGE, "Do not car/heli kill eachother, it is forbidden and will result in a punishment!");
SendClientMessage(playerid, COLOR_ORANGE, "Do not spawnkill! It is strictly forbidden and will result in a punishment!");
return 1;
}
if (strcmp("/kill", cmdtext, true, 10) == 0)
{
SetPlayerHealth(playerid, 0);
SendClientMessage(playerid, COLOR_GREY, "You have succesfully killed yourself!");
return 1;
}
if (strcmp("/info", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, COLOR_ORANGE, "This is a Deathmatch Server, you have to kill everybody who is in your way!");
SendClientMessage(playerid, COLOR_ORANGE, "You can team up with other players, or be a lonewolf!");
SendClientMessage(playerid, COLOR_ORANGE, "Tired of the current skin? Press F4 or contact an admin!");
SendClientMessage(playerid, COLOR_ORANGE, "It is not that hard, just enjoy playing!");
return 1;
}
if (strcmp("/commands", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, COLOR_ORANGE, "/rules - /help - /info");
return 1;
}
return 1;
}