Ich würde gerne /startlesson mit Geld machen , also damit man
/startlesson (id) (betrag)
^
-
-
genau so
if(strcmp(cmd, "/startlesson", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "Benutze: /startlesson [playerid/PartOfName]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "* You've started %s's Lesson.",giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* Instructor %s has started your Lesson.",sendername);
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
TakingLesson[giveplayerid] = 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Der Player ist offline !");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Du bist kein Lehrer !");
return 1;
}
}
return 1;
}