Beiträge von CubedDeath

    if(strcmp(cmd, "/setscore", true) == 0)
    {
    new score;
    new i;
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid,Grün,"Benutze: /setscore [SpielerID] [Score]");
    return 1;
    }
    i = strval(tmp);
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid,Grün,"Benutze: /setscore [SpielerID] [Score]");
    return 1;
    }
    score = strval(tmp);
    SetPlayerScore(i,score);
    return 1;
    }


    einfach command kann man noch erweitern mit Message usw.

    public SetPlayertestRandomSpawn(playerid)
    {
    if (testSpawn[playerid] == 0)
    {
    new rand = random(sizeof(ArrestRandomSpawn));
    SetPlayerPos(playerid, testRandomSpawn[rand][0], testRandomSpawn[rand][1], testRandomSpawn[rand][2]);
    }
    return 1;
    }

    if(fexist("filename.txt")) {
    new name[16];
    GetPlayerName(playerid,name,sizeof(name));
    if(strfind(name,"[RLG]",true)==0) {
    new File:gla=fopen("filename.txt",io_read), s[128], sn=strlen(name), darf;
    while(fread(gla,s)) {
    for(new i=0, j=strlen(s); i<j; i++) {
    if(!i) {
    if(strcmp(s,name,true,sn)==0) {
    darf=1;
    i=j; }}
    else if(s[i]==' ') {
    if(strcmp(s,name,true,sn)==0) {
    darf=1;
    i=j; }}}}
    fclose(gla);
    if(!darf) { Kick(playerid);
    SendClientMessage(playerid,color,"Du wurdest gekickt! Grund: Du gehörst nicht zum Clan!"); }}}

    public OnPlayerStateChange(playerid, newstate, oldstate)
    {
    if(newstate == 2)
    {
    if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 548 || 520 || 425 || 563)
    {
    if(gTeam[playerid] == TEAM_STURMSOLDAT)
    {
    RemovePlayerFromVehicle(playerid);
    SendClientMessage(playerid,COLOR_USA,"Du bist kein Pilot!");
    }
    }
    }
    if(newstate == 2)
    {
    if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 599 || 470 || 433 || 427)
    {
    if(gTeam[playerid] == TEAM_PILOT)
    {
    RemovePlayerFromVehicle(playerid);
    SendClientMessage(playerid,COLOR_USA,"Du bist kein Sturmsoldat!");
    }
    }
    }
    return 1;
    }

    public OnPlayerText(playerid, text[])
    {
    if(text[0] == '#') {
    new n[MAX_PLAYER_NAME], s[128];
    GetPlayerName(playerid, n, sizeof(n));
    format(s, sizeof(s), "%s: %s", n, text[1]);
    SendClientMessage(playerid,0xFF00FFFF,s);
    return 0;
    }
    return 1;
    }

    if(strcmp(cmd, "/clearchat", true) == 0)
    {
    if (PlayerInfo[playerid][pAdmin] >= 1)
    {
    for (new a=1;a<=10;a++)
    {
    // Clearchat v2.49 by mR_FatJoe <3
    SendClientMessageToAll(0, "Chat Gecleart");
    SendClientMessageToAll(0, "\n");
    SendClientMessageToAll(0, "\n");
    SendClientMessageToAll(0, "\n");
    SendClientMessageToAll(0, "\n");
    GameTextForAll("Admin Clearte Den Chat!",6000,1);
    new Player[MAX_PLAYER_NAME];
    GetPlayerName(playerid,Player,sizeof(Player));
    format(string, sizeof(string), "*** Administrator %s clearte den Chat ***",Player);
    SendClientMessageToAll(0, "\n");
    printf(string);
    }
    }
    return 1;
    }


    sollte so gehen :/

    public OnGameModeInit()
    {


    //ATM Bankautomaten Objecte
    CreateObject(2942, 810.565063, -1623.768799, 13.189775, 0.0000, 0.0000, 90.0001);
    CreateObject(2942, 1000.825195, -922.610168, 41.971024, 0.0000, 0.0000, 277.8123);
    CreateObject(2942, 1504.693359, -1706.567749, 13.689775, 0.0000, 0.0000, 90.0000);
    CreateObject(2942, 1928.620850, -1771.269043, 13.189775, 0.0000, 0.0000, 90.0000);
    CreateObject(2942, 1036.071655, -1024.509766, 31.744461, 0.0000, 0.0000, 0.0000);
    CreateObject(2942, 926.909912, -1355.081421, 13.021199, 0.0000, 0.0000, 270.0000);
    CreateObject(2942, 491.439484, -1734.586548, 10.871187, 0.0000, 0.0000, 168.3452);
    CreateObject(2942, 380.780701, -2021.725830, 7.478837, 0.0000, 0.0000, 0.0000);
    CreateObject(2942, 1223.778320, -1744.292603, 13.240016, 0.0000, 0.0000, 193.3734);
    CreateObject(2942, 2105.436035, -1809.228516, 13.197587, 0.0000, 0.0000, 270.0000);
    CreateObject(2942, 2072.053955, -1836.951416, 13.197434, 0.0000, 0.0000, 90.0001);
    CreateObject(2942, 1956.735596, -2186.291016, 13.189775, 0.0000, 0.0000, 90.0000);
    CreateObject(2942, 2394.498047, -1914.865356, 13.189775, 0.0000, 0.0000, 0.0000);
    CreateObject(2942, 2779.040283, -1821.910034, 10.157268, 0.0000, 0.0000, 33.7500);
    CreateObject(2942, 1196.011841, -918.630188, 42.792793, 0.0000, 0.0000, 5.1566);
    return 1;
    }