03.10.2010, 12:18
Hello, im have 3problems with TDM server... So, im maked a message, when player connected joined some team. Now, when player connect, choose Triads spawn, spawn and death server send message to all: *Name* joined Triads team. ( but he doesnt press f4, and change team. )
example:
now, problem with commands.. so, im created 4npc bots. Now, when i using teleport cmd. ( /teleportuotis [ID/name) example: player name are ShadowX, im typing /teleportuotis ShadowX, and my pos setting to Yakuza NPC bot.. and if ShadowX in car, im typing /gautiz ( gets player ) server just teleporting some unused car, and 'attach' +3 metres at Z coordinates. so what swrong? ;X
example:
Код:
SetPlayerToTeamColour(playerid) // Funkcija { // Atidarymas if(IsPlayerNPC(playerid)) return 1; // Jei ћaidėjas NPC - nieko jam nedarom new Vardaz[MAX_PLAYER_NAME]; // Vardo gavimo kintamasis GetPlayerName(playerid,Vardaz,sizeof(Vardaz)); // Gauna ћaidėjo vardą new mess[65]; // String if(ZaidejoKomanda[playerid] == Yakuza) // Patikrinam, ar ћaidėjas yra Yakuza komandoje. { // Atidarom funkciją SetPlayerColor(playerid,ySpalva); // Mėlyna for(new i=0; i<MAX_PLAYERS; i++) SetPlayerMarkerForPlayer( i, playerid, ( GetPlayerColor( playerid ) & ySpalva ) ); NustatytiGyvybes(playerid, 100); // Gyvybės NustatytiLygi(playerid, WEAPONSKILL_DESERT_EAGLE, 0); // Nustatom Deagle skill lygį į 0 NustatytiLygi(playerid, WEAPONSKILL_MP5, 0); // Nustatom MP5 skill lygį į 0 NustatytiLygi(playerid, WEAPONSKILL_AK47, 0); // Nustatom AK-47 skill lygį į 0 NustatytiLygi(playerid, WEAPONSKILL_SHOTGUN, 0); // Nustatom Shotgun skill lygį į 0 format(mess,sizeof(mess),"GangWars: %s joined Yakuza team",Vardaz); // Formatuoja SendClientMessageToAll(MELYNA,mess); // Nusiunčia ћaidėjams SetPlayerTeam(playerid,Yakuza); // Komanda } //// another shit
Код:
//===========================[Teleportavimasis]=========================================== COMMAND:teleportuotis(playerid, params[]) { new id = strval(params), Float:x, Float:y, Float:z; GetPlayerPos(id, x, y, z); if (ZaidejoInformacija[playerid][Padejejas] <= 0) return SukurtiDialog(playerid, 5, DIALOG_STYLE_MSGBOX,"GangWars", "Рi komanda TIK Padejлjams!", "Gerai", "Uюdaryti"); if(id == playerid) return SukurtiDialog(playerid, 5, DIALOG_STYLE_MSGBOX,"GangWars", "Kam teleportuotis pas save?", "Gerai", "Uюdaryti"); if (isnull(params)) return SukurtiDialog(playerid, 5, DIALOG_STYLE_MSGBOX,"GangWars", "Naudojimas: /teleportuotis [ID]", "Gerai", "Uюdaryti"); if(IsPlayerInAnyVehicle(playerid)) { SetVehiclePos(playerid, x, y, z+3); }else{ SetPlayerPos(playerid, x + 1, y + 1, z); } return 1; } //===========================[Teleportavimasis]=========================================== COMMAND:gautiz(playerid, params[]) { new id = strval(params), Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); if (ZaidejoInformacija[playerid][Padejejas] <= 0) return SukurtiDialog(playerid, 5, DIALOG_STYLE_MSGBOX,"GangWars", "Рi komanda TIK Padejлjams!", "Gerai", "Uюdaryti"); if (isnull(params)) return SukurtiDialog(playerid, 5, DIALOG_STYLE_MSGBOX,"GangWars", "Naudojimas: /gautiz [ID]", "Gerai", "Uюdaryti"); if(id == playerid) return SukurtiDialog(playerid, 5, DIALOG_STYLE_MSGBOX,"GangWars", "Kam teleportuotis pas save?", "Gerai", "Uюdaryti"); if(IsPlayerNPC(id)) return SukurtiDialog(playerid, 5, DIALOG_STYLE_MSGBOX,"GangWars", "NPC atsiteleportuoti negalima", "Gerai", "Uюdaryti"); if(IsPlayerInAnyVehicle(id)) { SetVehiclePos(id, x, y, z+3); }else{ NustatytiPozicija(id, x + 1, y + 1, z); } return 1; }