Ich hab gerade nen Blackout sorry. Kann mir jemand bitte miene Fehler sagen. Ich gebe /dmv driving 10 ein und es geht trotzdem:
if(strcmp(cmd, "/dmv", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(!PlayerToPoint(2.0, playerid, -2033.1744,-117.2761,1035.1719)) return SendClientMessage(playerid, COLOR_GRAD2," You are not at the driving school !");
if(Instructor >= 1) { return 1; }
new x_nr[256];
x_nr = strtok(cmdtext, idx);
if(!strlen(x_nr))
{
SendClientMessage(playerid, COLOR_DRED, "|______DMV- Information______|");
SendClientMessage(playerid, COLOR_WHITE, "Drivng license ($1500)");
SendClientMessage(playerid, COLOR_GRAD2, "Type in /dmv driving !");
SendClientMessage(playerid, COLOR_DRED, "|____________________________|");
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /dmv [name]");
SendClientMessage(playerid, COLOR_WHITE, "Available names: Driving.");
return 1;
}
if(strcmp(x_nr,"Driving",true) == 0)
{
//tmp = strtok(cmdtext, idx);
if(!strlen(x_nr))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /dmv driving");
return 1;
}
if(PlayerInfo[playerid][pCarLic] == 1) { SendClientMessage(playerid, COLOR_GRAD2," You have already a driving license !"); return 1;}
if(GetPlayerMoney(playerid) < 2000) { SendClientMessage(playerid, COLOR_GRAD2, " You have not enough money !"); return 1;}
SendClientMessage(playerid, COLOR_RED2, "|______DMV - Introduction______|");
SendClientMessage(playerid, COLOR_WHITE, "If you want to park your, just remember to park on the pavement.");
SendClientMessage(playerid, COLOR_WHITE, "Please drive slow to avoid crashes / accidents later on !");
SendClientMessage(playerid, COLOR_WHITE, "If you are calling s.o. or writing please park your car on the pavement.");
SendClientMessage(playerid, COLOR_WHITE, "At least please do not watch out for the traffix lights.");
SendClientMessage(playerid, COLOR_WHITE, "We hope you enjoy playing on our Server.");
PlayerInfo[playerid][pCarLic] = 1;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have bought your driving license *");
return 1;
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /dmv [name]");
SendClientMessage(playerid, COLOR_WHITE, "Available names: Driving.");
return 1;
}
}//not connected
return 1;
}