"Trebam nešto" - tema

Započeo vlado_plavsic, Avgust 16, 2012, 20:15:55 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 5 gostiju pregledaju ovu temu.


proveris konstruktor prepoznavanja id-a igraca sa tvojim id-eom ako je isti returnas i to je to.
69

trebao bih koamndu da kad napise npr /globalrestart da mi sve vikendice kuce stanovec firme aute itd stavi da opet sve treba kupiti jel mi moze dati netko tu komandu ako uopce postaji?

Ako moze neko HITNO da mi prebaci ovu komandu u YCMD!
Nista da ne dira, tj ni text ni admini, nista samo da je prebaci! Hitno!
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
if(strcmp(cmd, "/changename", true) == 0)
{
    GetPlayerName(playerid, sendername, sizeof(sendername));
new tmpp[256];
tmpp = strtok(cmdtext, idx);
if(!strlen(tmpp))
{
SendClientMessage(playerid, COLOR_DBLUE, "Correct SYNTAX: /changename [playerid] [new nick]");
return 1;
}
giveplayerid = strval(tmpp);
tmp = strtok(cmdtext, idx);
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
if(IsPlayerConnected(playerid))
{
    if(PlayerInfo[playerid][pAdmin] >= 1337)
    {
        if(IsPlayerConnected(giveplayerid))
        {
SetPlayerName(giveplayerid, tmp);
format(string, sizeof(string), "AdmCMD: %s(%i) vam je promjenio ime u %s", sendername, playerid, tmp);
SendClientMessage(giveplayerid, COLOR_DBLUE, string);
format(string, sizeof(string), "AdmCMD: You have changed ID %i's name to %s", giveplayerid, tmp);
SendClientMessage(playerid, COLOR_DBLUE, string);
format(string, 256, "[ADMIN] %s has changed %s's his name to %s.", sendername,giveplayer, tmp);
ABroadCast(COLOR_YELLOW,string,1);
}
else
{
    format(string, sizeof(string), "%d nije aktivan igrac.", giveplayerid);
SendClientMessage(playerid, COLOR_RED, string);
}
}
else
{
    SendClientMessage(playerid, COLOR_RED, "Nemate dozovolu za koristenje te komande!");
}
}
else
{
    SendClientMessage(playerid, COLOR_RED, "Morate se prijaviti da biste koristili tu komandu!");
}
  return 1;
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////


Citat: мιккι# poslato Avgust 14, 2014, 15:24:29 POSLE PODNE
Ako moze neko HITNO da mi prebaci ovu komandu u YCMD!
Nista da ne dira, tj ni text ni admini, nista samo da je prebaci! Hitno!
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
if(strcmp(cmd, "/changename", true) == 0)
{
    GetPlayerName(playerid, sendername, sizeof(sendername));
new tmpp[256];
tmpp = strtok(cmdtext, idx);
if(!strlen(tmpp))
{
SendClientMessage(playerid, COLOR_DBLUE, "Correct SYNTAX: /changename [playerid] [new nick]");
return 1;
}
giveplayerid = strval(tmpp);
tmp = strtok(cmdtext, idx);
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
if(IsPlayerConnected(playerid))
{
    if(PlayerInfo[playerid][pAdmin] >= 1337)
    {
        if(IsPlayerConnected(giveplayerid))
        {
SetPlayerName(giveplayerid, tmp);
format(string, sizeof(string), "AdmCMD: %s(%i) vam je promjenio ime u %s", sendername, playerid, tmp);
SendClientMessage(giveplayerid, COLOR_DBLUE, string);
format(string, sizeof(string), "AdmCMD: You have changed ID %i's name to %s", giveplayerid, tmp);
SendClientMessage(playerid, COLOR_DBLUE, string);
format(string, 256, "[ADMIN] %s has changed %s's his name to %s.", sendername,giveplayer, tmp);
ABroadCast(COLOR_YELLOW,string,1);
}
else
{
    format(string, sizeof(string), "%d nije aktivan igrac.", giveplayerid);
SendClientMessage(playerid, COLOR_RED, string);
}
}
else
{
    SendClientMessage(playerid, COLOR_RED, "Nemate dozovolu za koristenje te komande!");
}
}
else
{
    SendClientMessage(playerid, COLOR_RED, "Morate se prijaviti da biste koristili tu komandu!");
}
  return 1;
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////


Evo ti, moja ti je preporuka da kombinujes YCMD sa sscanf-om ali kako hoces:


//////////////////////////////////////////////////////////////////////////////////////////////////////////////
YCMD:changename(playerid,params[],help)
{
    GetPlayerName(playerid, sendername, sizeof(sendername));
new tmpp[256];
tmpp = strtok(cmdtext, idx);
if(!strlen(tmpp))
{
SendClientMessage(playerid, COLOR_DBLUE, "Correct SYNTAX: /changename [playerid] [new nick]");
return 1;
}
giveplayerid = strval(tmpp);
tmp = strtok(cmdtext, idx);
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
if(IsPlayerConnected(playerid))
{
    if(PlayerInfo[playerid][pAdmin] >= 1337)
    {
        if(IsPlayerConnected(giveplayerid))
        {
SetPlayerName(giveplayerid, tmp);
format(string, sizeof(string), "AdmCMD: %s(%i) vam je promjenio ime u %s", sendername, playerid, tmp);
SendClientMessage(giveplayerid, COLOR_DBLUE, string);
format(string, sizeof(string), "AdmCMD: You have changed ID %i's name to %s", giveplayerid, tmp);
SendClientMessage(playerid, COLOR_DBLUE, string);
format(string, 256, "[ADMIN] %s has changed %s's his name to %s.", sendername,giveplayer, tmp);
ABroadCast(COLOR_YELLOW,string,1);
}
else
{
    format(string, sizeof(string), "%d nije aktivan igrac.", giveplayerid);
SendClientMessage(playerid, COLOR_RED, string);
}
}
else
{
    SendClientMessage(playerid, COLOR_RED, "Nemate dozovolu za koristenje te komande!");
}
}
else
{
    SendClientMessage(playerid, COLOR_RED, "Morate se prijaviti da biste koristili tu komandu!");
}
  return 1;
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////

Citat: Lenon poslato Avgust 14, 2014, 17:04:47 POSLE PODNE
Citat: мιккι# poslato Avgust 14, 2014, 15:24:29 POSLE PODNE
Ako moze neko HITNO da mi prebaci ovu komandu u YCMD!
Nista da ne dira, tj ni text ni admini, nista samo da je prebaci! Hitno!
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
if(strcmp(cmd, "/changename", true) == 0)
{
    GetPlayerName(playerid, sendername, sizeof(sendername));
new tmpp[256];
tmpp = strtok(cmdtext, idx);
if(!strlen(tmpp))
{
SendClientMessage(playerid, COLOR_DBLUE, "Correct SYNTAX: /changename [playerid] [new nick]");
return 1;
}
giveplayerid = strval(tmpp);
tmp = strtok(cmdtext, idx);
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
if(IsPlayerConnected(playerid))
{
    if(PlayerInfo[playerid][pAdmin] >= 1337)
    {
        if(IsPlayerConnected(giveplayerid))
        {
SetPlayerName(giveplayerid, tmp);
format(string, sizeof(string), "AdmCMD: %s(%i) vam je promjenio ime u %s", sendername, playerid, tmp);
SendClientMessage(giveplayerid, COLOR_DBLUE, string);
format(string, sizeof(string), "AdmCMD: You have changed ID %i's name to %s", giveplayerid, tmp);
SendClientMessage(playerid, COLOR_DBLUE, string);
format(string, 256, "[ADMIN] %s has changed %s's his name to %s.", sendername,giveplayer, tmp);
ABroadCast(COLOR_YELLOW,string,1);
}
else
{
    format(string, sizeof(string), "%d nije aktivan igrac.", giveplayerid);
SendClientMessage(playerid, COLOR_RED, string);
}
}
else
{
    SendClientMessage(playerid, COLOR_RED, "Nemate dozovolu za koristenje te komande!");
}
}
else
{
    SendClientMessage(playerid, COLOR_RED, "Morate se prijaviti da biste koristili tu komandu!");
}
  return 1;
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////


Evo ti, moja ti je preporuka da kombinujes YCMD sa sscanf-om ali kako hoces:


//////////////////////////////////////////////////////////////////////////////////////////////////////////////
YCMD:changename(playerid,params[],help)
{
    GetPlayerName(playerid, sendername, sizeof(sendername));
new tmpp[256];
tmpp = strtok(cmdtext, idx);
if(!strlen(tmpp))
{
SendClientMessage(playerid, COLOR_DBLUE, "Correct SYNTAX: /changename [playerid] [new nick]");
return 1;
}
giveplayerid = strval(tmpp);
tmp = strtok(cmdtext, idx);
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
if(IsPlayerConnected(playerid))
{
    if(PlayerInfo[playerid][pAdmin] >= 1337)
    {
        if(IsPlayerConnected(giveplayerid))
        {
SetPlayerName(giveplayerid, tmp);
format(string, sizeof(string), "AdmCMD: %s(%i) vam je promjenio ime u %s", sendername, playerid, tmp);
SendClientMessage(giveplayerid, COLOR_DBLUE, string);
format(string, sizeof(string), "AdmCMD: You have changed ID %i's name to %s", giveplayerid, tmp);
SendClientMessage(playerid, COLOR_DBLUE, string);
format(string, 256, "[ADMIN] %s has changed %s's his name to %s.", sendername,giveplayer, tmp);
ABroadCast(COLOR_YELLOW,string,1);
}
else
{
    format(string, sizeof(string), "%d nije aktivan igrac.", giveplayerid);
SendClientMessage(playerid, COLOR_RED, string);
}
}
else
{
    SendClientMessage(playerid, COLOR_RED, "Nemate dozovolu za koristenje te komande!");
}
}
else
{
    SendClientMessage(playerid, COLOR_RED, "Morate se prijaviti da biste koristili tu komandu!");
}
  return 1;
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////

Ne znam zasto mi pravi problem oko ''sendername'' ?C:\Users\Milos\Desktop\Pomozi Boze!\gamemodes\FCRP.pwn(7997) : error 017: undefined symbol "sendername"
C:\Users\Milos\Desktop\Pomozi Boze!\gamemodes\FCRP.pwn(7997) : error 017: undefined symbol "sendername"
C:\Users\Milos\Desktop\Pomozi Boze!\gamemodes\FCRP.pwn(7997) : error 029: invalid expression, assumed zero
C:\Users\Milos\Desktop\Pomozi Boze!\gamemodes\FCRP.pwn(7997) : fatal error 107: too many error messages on one line


POMOC! Treba mi objasnjnje da li neko zna kako da napravim random textdraw-ova kao npr randomMessages? radio sam na slicnu foru nema errora ali se TD ne smenjuju...


Citat: мιккι# poslato Avgust 15, 2014, 00:53:17 PRE PODNE
POMOC! Treba mi objasnjnje da li neko zna kako da napravim random textdraw-ova kao npr randomMessages? radio sam na slicnu foru nema errora ali se TD ne smenjuju...
Neradi bre DP vise,sta je stobom,imas milion tutova sta bezveze DP-as.
69

Citat: мιккι# poslato Avgust 15, 2014, 00:53:17 PRE PODNE
POMOC! Treba mi objasnjnje da li neko zna kako da napravim random textdraw-ova kao npr randomMessages? radio sam na slicnu foru nema errora ali se TD ne smenjuju...

Imas na stotine takvih fs-a pa izvuci iz njih.  Samo koristi trazilicu :)
Software Developer

Zasto na kucnom serveru ne mogu ubaciti createdynicobject vec samo createobject


Treba mi ako neko ima GTA RP preveden mod bez bagova.
    ~ Member since: 09.13.2013. - 15:30 ~

Citat: Mato RP poslato Avgust 13, 2014, 14:14:53 POSLE PODNE
trebao bih koamndu da kad napise npr /globalrestart da mi sve vikendice kuce stanovec firme aute itd stavi da opet sve treba kupiti jel mi moze dati netko tu komandu ako uopce postaji?
Jel mi moze netko ovo dat?

Citat: Electro Hous poslato Avgust 16, 2014, 16:24:59 POSLE PODNE
Treba mi ako neko ima GTA RP preveden mod bez bagova.
Ja sam ti rekao nacin kako da naucis da skriptas :) Pa ti vidi :)


Moze neko da mi da bilo koji gm da ima CoS system ima 3 slota vozila.
    ~ Member since: 09.13.2013. - 15:30 ~