Beiträge von RFT

    / if(strcmp(cmd,"/put",true)==0)
    {
    if(IsPlayerConnected(playerid))
    {
    if(PlayerToPoint(25.0,playerid,2513.334717,-1676.568726,12.541371) || PlayerToPoint(3.0,playerid,1941.511108,-1120.094360,25.473835) || PlayerToPoint(3.0,playerid,1123.634399,-2044.185425,73.426231) || PlayerToPoint(3.0,playerid,726.177185,-1441.119629,16.691856) || PlayerToPoint(3.0,playerid,2605.198730,1680.478271,9.973106) || PlayerToPoint(3.0,playerid,-35.879395, 59.165298, 2.113732))
    {
    new x_nr[256];
    x_nr = strtok(cmdtext, idx);
    if(!strlen(x_nr)) {
    SendClientMessage(playerid, COLOR_WHITE, "|__________________ Put __________________|");
    SendClientMessage(playerid, COLOR_WHITE, "USAGE: /put [name]");
    SendClientMessage(playerid, COLOR_GREY, "Available names: Mats, Drugs");
    SendClientMessage(playerid, COLOR_WHITE, "|____________________________________________|");
    return 1;
    }
    if(strcmp(x_nr,"Mats",true) == 0)
    {
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD2, "USAGE: Mats [amount]");
    format(string, sizeof(string), " You Have %d Mats on you.", PlayerInfo[playerid][pMats]);
    SendClientMessage(playerid, COLOR_GRAD3, string);
    return 1;
    }
    new matss;
    matss = strval(tmp);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD2, "USAGE: Mats [amount]");
    format(string, sizeof(string), " You Have %d Mats on you.", PlayerInfo[playerid][pMats]);
    SendClientMessage(playerid, COLOR_GRAD3, string);
    return 1;
    }
    if(matss > PlayerInfo[playerid][pMats])
    {
    SendClientMessage(playerid, COLOR_GRAD2, " You don't have that many!");
    return 1;
    }
    PlayerInfo[playerid][pMats] -= matss;
    PlayerInfo[playerid][pBoxMats] += matss;
    format(string, sizeof(string), " %d materials deposited!", matss);
    SendClientMessage(playerid, COLOR_GRAD4, string);
    return 1;
    }
    else if(strcmp(x_nr,"Drugs",true) == 0)
    {
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD2, "USAGE: Drugs [amount]");
    format(string, sizeof(string), " You Have %d Drugs on you.", PlayerInfo[playerid][pDrugs]);
    SendClientMessage(playerid, COLOR_GRAD3, string);
    return 1;
    }
    new drugss;
    drugss = strval(tmp);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD2, "USAGE: Drugs [amount]");
    format(string, sizeof(string), " You Have %d Drugs on you.", PlayerInfo[playerid][pDrugs]);
    SendClientMessage(playerid, COLOR_GRAD3, string);
    return 1;
    }
    if(drugss > PlayerInfo[playerid][pDrugs])
    {
    SendClientMessage(playerid, COLOR_GRAD2, " You don't have that many!");
    return 1;
    }
    PlayerInfo[playerid][pDrugs] -= drugss;
    PlayerInfo[playerid][pBoxDrugs] += drugss;
    format(string, sizeof(string), " %d Drugs deposited!", drugss);
    SendClientMessage(playerid, COLOR_GRAD4, string);
    return 1;
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, " You are not in the safebox place !");
    return 1;
    }
    }//not connected
    return 1;
    }
    if(strcmp(cmd,"/gtake",true)==0)
    {
    if(IsPlayerConnected(playerid))
    {
    if(PlayerToPoint(25.0,playerid,2513.334717,-1676.568726,12.541371) || PlayerToPoint(3.0,playerid,1941.511108,-1120.094360,25.473835) || PlayerToPoint(3.0,playerid,1123.634399,-2044.185425,73.426231) || PlayerToPoint(3.0,playerid,726.177185,-1441.119629,16.691856) || PlayerToPoint(3.0,playerid,2605.198730,1680.478271,9.973106) || PlayerToPoint(3.0,playerid,-35.879395, 59.165298, 2.113732)) //Hier deine coords
    {
    new x_nr[256];
    x_nr = strtok(cmdtext, idx);
    if(!strlen(x_nr)) {
    SendClientMessage(playerid, COLOR_WHITE, "|__________________ Put __________________|");
    SendClientMessage(playerid, COLOR_WHITE, "USAGE: /gtake [name]");
    SendClientMessage(playerid, COLOR_GREY, "Available names: Mats, Drugs");
    SendClientMessage(playerid, COLOR_WHITE, "|____________________________________________|");
    return 1;
    }
    if(strcmp(x_nr,"Mats",true) == 0)
    {
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD2, "USAGE: Mats [amount]");
    format(string, sizeof(string), " You Have %d Mats on your SafeBox.", PlayerInfo[playerid][pBoxMats]);
    SendClientMessage(playerid, COLOR_GRAD3, string);
    return 1;
    }
    new matss;
    matss = strval(tmp);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD2, "USAGE: Mats [amount]");
    format(string, sizeof(string), " You Have %d Mats on your SafeBox.", PlayerInfo[playerid][pBoxMats]);
    SendClientMessage(playerid, COLOR_GRAD3, string);
    return 1;
    }
    if(matss > PlayerInfo[playerid][pBoxMats])
    {
    SendClientMessage(playerid, COLOR_GRAD2, " You don't have that many!");
    return 1;
    }
    PlayerInfo[playerid][pBoxMats] -= matss;
    PlayerInfo[playerid][pMats] += matss;
    format(string, sizeof(string), " %d materials Taken!", matss);
    SendClientMessage(playerid, COLOR_GRAD4, string);
    return 1;
    }
    else if(strcmp(x_nr,"Drugs",true) == 0)
    {
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD2, "USAGE: Drugs [amount]");
    format(string, sizeof(string), " You Have %d Drugs on your SafeBox.", PlayerInfo[playerid][pBoxDrugs]);
    SendClientMessage(playerid, COLOR_GRAD3, string);
    return 1;
    }
    new drugss;
    drugss = strval(tmp);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD2, "USAGE: Drugs [amount]");
    format(string, sizeof(string), " You Have %d Drugs on your SafeBox.", PlayerInfo[playerid][pBoxDrugs]);
    SendClientMessage(playerid, COLOR_GRAD3, string);
    return 1;
    }
    if(drugss > PlayerInfo[playerid][pBoxDrugs])
    {
    SendClientMessage(playerid, COLOR_GRAD2, " You don't have that many!");
    return 1;
    }
    PlayerInfo[playerid][pBoxDrugs] -= drugss;
    PlayerInfo[playerid][pDrugs] += drugss;
    format(string, sizeof(string), " %d Drugs Taken!", drugss);
    SendClientMessage(playerid, COLOR_GRAD4, string);
    return 1;
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, " You are not in the safebox place !");
    return 1;
    }
    }//not connected
    return 1;
    }

    keks das funktioniert danke aber ein problem habe ich noch ich habe alles versucht auch schon in der sufu ich kappiere das nicht ich will das nur die cops mit ihren autos fahren können aber immer scheitere ich dran immer wieder können zivis und alle damit fahren kann mir bitte dabei einer helfen

    ich habe es mal versucht mit find zu suchen aber gibts nicht und den befehl da der muss ja auch defieniert werden also bitte alles von oldcar senden

    Du machst ein neues call back wo du die autos definiert hast und dann bei onplayerstate change if (dein callback ) oder irgendwieso

    du musst das auch definieren unter on player state change möchtest du ein car system machen dann kann ich dir weiter helfen ich habe nähmlich auch mein eigenes gemacht