jedan covek u jedan tim drug u drug tim

Započeo [IF] mariomako, Jun 30, 2010, 20:08:07 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Citat: Mario Velickovski poslato Jul 03, 2010, 09:22:41 PRE PODNE
Citat: Christian_Bojic poslato Jul 03, 2010, 03:14:43 PRE PODNE
imam ideju

mozes da napravis random grupe posto nemoze ako jedan udje u jednu a drugi koji ukuca u drugu, evo random spawn sa razlicitim skinovima

if(strcmp(cmdtext, "/DM", true) == 0)
{
        GetPlayerName(playerid, pName, sizeof(pName));
        format(string, sizeof(string), "TELEPORTI: %s je usao u Team DM arenu (/DM)", pName);
        SendClientMessageToAll(COLOR_YELLOW, string);
    ResetPlayerWeapons(playerid);
new DM[128], playerName[MAX_PLAYER_NAME], RandomSpawn = random(4);
GetPlayerName(playerid, playerName, MAX_PLAYER_NAME);
DMZone[playerid] = 1;
if (RandomSpawn == 0)
{
InCar[playerid] = false;
SetPlayerPos(playerid, X,Y,Z);
SetPlayerFacingAngle(playerid, Angle);
SetCameraBehindPlayer(playerid);
SetPlayerSkin(playerid, IDskina);
}
if (RandomSpawn == 1)
{
InCar[playerid] = false;
SetPlayerPos(playerid, X,Y,Z);
SetPlayerFacingAngle(playerid, Angle);
SetCameraBehindPlayer(playerid);
SetPlayerSkin(playerid, IDskina);
}
if (RandomSpawn == 2)
{
InCar[playerid] = false;
SetPlayerPos(playerid, X,Y,Z);
SetPlayerFacingAngle(playerid, Angle);
SetCameraBehindPlayer(playerid);
SetPlayerSkin(playerid, IDskina);
}
if (RandomSpawn == 3)
{
InCar[playerid] = false;
SetPlayerPos(playerid, X,Y,Z);
SetPlayerFacingAngle(playerid, Angle);
SetCameraBehindPlayer(playerid);
SetPlayerSkin(playerid, IDskina);
}
GivePlayerWeapon(playerid, IDoruzja, metkovi);
SetPlayerInterior(playerid, 0);
SendClientMessage(playerid, COLOR_BASIC, "Ti si usao na Team DM);
SendClientMessage(playerid, COLOR_RED, "Zelimo tu lepo zabavu na Team DM");
format(DM, sizeof(DM), "%s je teleportovan na /DM", playerName);
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(ReceiveInfo[i] == true)
{
SendClientMessage(i, COLOR_GREY, DM);
}
}
}
return 1;
}


tako bi bilo

trebas da izmenis GivePlayerWeapon sto pise tamo i ako oces jos oruzja da budu samo pritisnes enter i
GivePlayerWeapon(playerid, IDoruzja, metkovi);
i trebas da izmenis pozicije, Angle i ID skina da stavis koji hoces

stavio sam 4 spawna da bi bilo 2 random spawna za jedan tim i 2 random spawna za drugi tim

nadam se da sam pomogao

evo kako mi je izaslo

if(strcmp(cmdtext, "/DM", true) == 0)
    {
GetPlayerName(playerid, pName, sizeof(pName));
format(string, sizeof(string), "%s je usao u Team DM arenu (/DM)", pName);
SendClientMessageToAll(COLOR_YELLOW, string);
ResetPlayerWeapons(playerid);
new DM[128], playerName[MAX_PLAYER_NAME], RandomSpawn = random(4);
GetPlayerName(playerid, playerName, MAX_PLAYER_NAME);
DMZone[playerid] = 1;
if (RandomSpawn == 0)
{
InCar[playerid] = false;
SetPlayerPos(playerid, 26.4734,1362.1244,9.1719);
SetCameraBehindPlayer(playerid);
SetPlayerSkin(playerid, 2);
}
if (RandomSpawn == 1)
{
InCar[playerid] = false;
SetPlayerPos(playerid, 3.7642,1344.8734,9.1719);
SetCameraBehindPlayer(playerid);
SetPlayerSkin(playerid, 1);
}
if (RandomSpawn == 2)
{
InCar[playerid] = false;
SetPlayerPos(playerid, 26.4734,1362.1244,9.1719;
SetCameraBehindPlayer(playerid);
SetPlayerSkin(playerid, 2);
}
if (RandomSpawn == 3)
{
InCar[playerid] = false;
SetPlayerPos(playerid, 3.7642,1344.8734,9.1719);
SetCameraBehindPlayer(playerid);
SetPlayerSkin(playerid, 1);
}
GivePlayerWeapon(playerid, 38, 999);
SetPlayerInterior(playerid, 0);
SendClientMessage(playerid, COLOR_BASIC, "Ti si usao na Team DM);
SendClientMessage(playerid, COLOR_RED, "Zelimo tu lepo zabavu na Team DM");
format(DM, sizeof(DM), "%s je teleportovan na /DM", playerName);
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(ReceiveInfo<i> == true)
{
SendClientMessage(i, COLOR_GREY, DM);
}
}
}
return 1;
}


ali nalazi mi sledece errore

E:\SAMP Server\PittBull Stunt\gamemodes\pitbull.pwn(89) : error 029: invalid expression, assumed zero
E:\SAMP Server\PittBull Stunt\gamemodes\pitbull.pwn(89) : warning 217: loose indentation
E:\SAMP Server\PittBull Stunt\gamemodes\pitbull.pwn(89) : error 029: invalid expression, assumed zero
E:\SAMP Server\PittBull Stunt\gamemodes\pitbull.pwn(89) : error 029: invalid expression, assumed zero
E:\SAMP Server\PittBull Stunt\gamemodes\pitbull.pwn(89) : fatal error 107: too many error messages on one line


i daj molimte vise ne postaj u CODE=C jel uvek mi nalazi loose identitation

onda evo ti code i znam u cemu je greska , greska je u svakom nisi stavio angle a to treba da izgleda
SetPlayerFacingAngle(playerid, AnglePozicija);

a evo celi u code opet lol
if(strcmp(cmdtext, "/DM", true) == 0)
{
        GetPlayerName(playerid, pName, sizeof(pName));
        format(string, sizeof(string), "TELEPORTI: %s je usao u Team DM Arenu (/DM)", pName);
        SendClientMessageToAll(COLOR_YELLOW, string);
    ResetPlayerWeapons(playerid);
new DM[128], playerName[MAX_PLAYER_NAME], RandomSpawn = random(4);
GetPlayerName(playerid, playerName, MAX_PLAYER_NAME);
DMZone[playerid] = 1;
if (RandomSpawn == 0)
{
InCar[playerid] = false;
SetPlayerPos(playerid, X,Y,Z);
SetPlayerFacingAngle(playerid, Angle);
SetCameraBehindPlayer(playerid);
SetPlayerSkin(playerid, IDskina);
}
if (RandomSpawn == 1)
{
InCar[playerid] = false;
SetPlayerPos(playerid, X,Y,Z);
SetPlayerFacingAngle(playerid, Angle);
SetCameraBehindPlayer(playerid);
SetPlayerSkin(playerid, IDskina);
}
if (RandomSpawn == 2)
{
InCar[playerid] = false;
SetPlayerPos(playerid, X,Y,Z;
SetPlayerFacingAngle(playerid, Angle);
SetCameraBehindPlayer(playerid);
SetPlayerSkin(playerid, IDskina);
}
if (RandomSpawn == 3)
{
InCar[playerid] = false;
SetPlayerPos(playerid, 2642.3181,2757.0920,23.8222);
SetPlayerFacingAngle(playerid, 121.7195);
SetCameraBehindPlayer(playerid);
SetPlayerSkin(playerid, IDskina);
}
GivePlayerWeapon(playerid, IDoruzja, metkovi);
SetPlayerInterior(playerid, 0);
SendClientMessage(playerid, COLOR_BASIC, "Usao si u Team DM arenu");
SendClientMessage(playerid, COLOR_RED, "Zelimo lepu zabavu na /DM");
format(DM, sizeof(DM), "%s je usao u Team DM Arenu (/DM)", playerName);
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(ReceiveInfo[i] == true)
{
SendClientMessage(i, COLOR_GREY, DM);
}
}
}
return 1;
}

jao sada opet mi nalazi errore

E:\SAMP Server\PittBull Stunt\gamemodes\pitbull.pwn(193) : error 017: undefined symbol "string"
E:\SAMP Server\PittBull Stunt\gamemodes\pitbull.pwn(193) : error 017: undefined symbol "string"
E:\SAMP Server\PittBull Stunt\gamemodes\pitbull.pwn(193) : error 029: invalid expression, assumed zero
E:\SAMP Server\PittBull Stunt\gamemodes\pitbull.pwn(193) : fatal error 107: too many error messages on one line


a evo kod u pawnu


//italy2
if(strcmp(cmdtext, "/DM", true) == 0)
{
       GetPlayerName(playerid, pName, sizeof(pName));
       format(string, sizeof(string), "TELEPORTI: %s je usao u Team DM Arenu (/DM)", pName);
       SendClientMessageToAll(COLOR_LIGHTRED, string);
   ResetPlayerWeapons(playerid);
new DM[128], playerName[MAX_PLAYER_NAME], RandomSpawn = random(4);
GetPlayerName(playerid, playerName, MAX_PLAYER_NAME);
DMZone[playerid] = 1;
if (RandomSpawn == 0)
{
InCar[playerid] = false;
SetPlayerPos(playerid, 3166.7976,-1678.3678,1.0938);
SetPlayerFacingAngle(playerid, 188.0115);
SetCameraBehindPlayer(playerid);
SetPlayerSkin(playerid, 1);
}
if (RandomSpawn == 1)
{
InCar[playerid] = false;
SetPlayerPos(playerid, 3138.0776,-1819.1744,1.0688);
SetPlayerFacingAngle(playerid, 332.1229);
SetCameraBehindPlayer(playerid);
SetPlayerSkin(playerid, 2);
}
if (RandomSpawn == 2)
{
InCar[playerid] = false;
SetPlayerPos(playerid, 3166.7976,-1678.3678,1.0938;
SetPlayerFacingAngle(playerid, 188.0115);
SetCameraBehindPlayer(playerid);
SetPlayerSkin(playerid, 1);
}
if (RandomSpawn == 3)
{
InCar[playerid] = false;
SetPlayerPos(playerid, 3138.0776,-1819.1744,1.0688);
SetPlayerFacingAngle(playerid, 332.1229);
SetCameraBehindPlayer(playerid);
SetPlayerSkin(playerid, 2);
}
GivePlayerWeapon(playerid, 22, 100);
SetPlayerInterior(playerid, 0);
SendClientMessage(playerid, COLOR_BASIC, "Usao si u Team DM arenu");
SendClientMessage(playerid, COLOR_RED, "Zelimo lepu zabavu na /DM");
format(DM, sizeof(DM), "%s je usao u Team DM Arenu (/DM)", playerName);
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(ReceiveInfo[i] == true)
{
SendClientMessage(i, COLOR_GREY, DM);
}
}
}
return 1;
}


EDIT: Otkazujem se od ovo sa random spawnova jel na italy2 mapu sam nasao veliki bug
Poslednja Izmena: Jul 03, 2010, 10:57:16 PRE PODNE od Mario Velickovski