Cze??. Mam cel zrobi? komend? kt?ra b?dzie przenosi? kolejno (nie losowo) graczy do r??nych miejsc - podaj? ca?y kod i prosz? o pomoc
Kod:
#include <a_samp>
new ZapisalSie[MAX_PLAYERS],
public OnPlayerConnect(playerid)
{
ZapisalSie[playerid] = 0;
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(ZapisalSie[playerid] == 1)
{
SendClientMessage(playerid, 0xff000ff, "Zapisa?e? si?, nie mo?esz u?ywa? komend!");
return 1;
}
if(!strcmp("/zapisz", cmdtext, true))
{
if(ZapisalSie[playerid] == 0)
{
SendClientMessage(playerid, 0xff0000ff, "Zapisa?e? si?!");
SetPlayerPos(playerid, 0.00, 0.00, 3.00); //1 miejsce
/*
SetPlayerPos(playerid, 1.00, 2.00, 3.00); //2 miejsce
SetPlayerPos(playerid, 2.00, 5.00, 3.00); //3 miejsce
//itd...
*/
ZapisalSie[playerid] = 1;
}
else
{
SendClientMessage(playerid, 0xff0000ff, "Ju? si? zapisa?e?!");
}
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
if(ZapisalSie[playerid] == 1)
{
ZapisalSie[playerid] = 0;
return 1;
}
}
Z g?ry dzi?kuj? za pomoc!