impulse81 Posted March 11, 2012 Report Share Posted March 11, 2012 cum fac la comanda /news de la news reporter , sa vada ce scrie reporterii pe /news numa cei care au cumparat radio de la 24/7? Si cum fac sa cumperi radio de la 24/7 ?aceasta este comanda:[pawn] if(strcmp(cmd, "/news", true) == 0) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pLeader] == 9) { new newcar = GetPlayerVehicleID(playerid); if(PlayerInfo[playerid][pMuted] == 1) { SendClientMessage(playerid, TEAM_CYAN_COLOR, " You cannot speak, you have been silenced !"); return 1; } if(newcar == nr1 || newcar == nr2 || newcar == nr3 || newcar == nr4 || newcar == nrh) { GetPlayerName(playerid, sendername, sizeof(sendername)); new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= ' ')) { idx++; } new offset = idx; new result[64]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } result[idx - offset] = EOS; result[0] = toupper(result[0]); if(FindIP(result)) /// Anti-Reclama { new advertiser[MAX_PLAYER_NAME]; GetPlayerName(playerid, advertiser, sizeof(advertiser)); format(string, sizeof(string), "AdmCmd: %s was warned & kicked by Server BOT, reason: Server Advertising",advertiser); SendClientMessageToAll(COLOR_LIGHTRED,string); KickLog(string); PlayerInfo[playerid][pWarns] += 1; Kick(playerid); return 1; } for(new s = 0; s < num_words; s++) { new pos; while((pos = strfind(result,Swears,true)) != -1) for(new i = pos, j = pos + strlen(Swears); i < j; i++) { result = '*'; } } if(!strlen(result)) { SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /news [newstext]"); return 1; } format(string, sizeof(string), "NR %s: %s", sendername, result); OOCNews(COLOR_NEWS,string); PlayerInfo[playerid][pNewsSkill] ++; if(PlayerInfo[playerid][pNewsSkill] == 50) { SendClientMessage(playerid, COLOR_YELLOW, "* Your News Reporter Skill is now Level 2, soon you are able to Fly the News Chopper and talk Live."); } else if(PlayerInfo[playerid][pNewsSkill] == 100) { SendClientMessage(playerid, COLOR_YELLOW, "* Your News Reporter Skill is now Level 3, soon you are able to Fly the News Chopper and talk Live."); } else if(PlayerInfo[playerid][pNewsSkill] == 200) { SendClientMessage(playerid, COLOR_YELLOW, "* Your News Reporter Skill is now Level 4, you can fly the News Chopper now."); } else if(PlayerInfo[playerid][pNewsSkill] == 400) { SendClientMessage(playerid, COLOR_YELLOW, "* Your News Reporter Skill is now Level 5, you can now talk Live with any person you want."); } } else { SendClientMessage(playerid, COLOR_GREY, " You are not in the News Van or Chopper !"); return 1; } } else { SendClientMessage(playerid, COLOR_GREY, " You are not a News Reporter !"); } }//not connected return 1; }[/pawn] Link to comment Share on other sites More sharing options...
TzAkS Posted March 11, 2012 Report Share Posted March 11, 2012 cum fac la comanda /news de la news reporter , sa vada ce scrie reporterii pe /news numa cei care au cumparat radio de la 24/7? Si cum fac sa cumperi radio de la 24/7 ?aceasta este comanda:[pawn] if(strcmp(cmd, "/news", true) == 0) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pRadio] == 0)//in loc de radio pui ce ai tu cand isi cumpara radio. { SendClientMessage(playerid, TEAM_CYAN_COLOR, " Nu ai cumparat radio..."); return 1; } if(PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pLeader] == 9) { new newcar = GetPlayerVehicleID(playerid); if(PlayerInfo[playerid][pMuted] == 1) { SendClientMessage(playerid, TEAM_CYAN_COLOR, " You cannot speak, you have been silenced !"); return 1; } if(newcar == nr1 || newcar == nr2 || newcar == nr3 || newcar == nr4 || newcar == nrh) { GetPlayerName(playerid, sendername, sizeof(sendername)); new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= ' ')) { idx++; } new offset = idx; new result[64]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } result[idx - offset] = EOS; result[0] = toupper(result[0]); if(FindIP(result)) /// Anti-Reclama { new advertiser[MAX_PLAYER_NAME]; GetPlayerName(playerid, advertiser, sizeof(advertiser)); format(string, sizeof(string), "AdmCmd: %s was warned & kicked by Server BOT, reason: Server Advertising",advertiser); SendClientMessageToAll(COLOR_LIGHTRED,string); KickLog(string); PlayerInfo[playerid][pWarns] += 1; Kick(playerid); return 1; } for(new s = 0; s < num_words; s++) { new pos; while((pos = strfind(result,Swears,true)) != -1) for(new i = pos, j = pos + strlen(Swears); i < j; i++) { result = '*'; } } if(!strlen(result)) { SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /news [newstext]"); return 1; } format(string, sizeof(string), "NR %s: %s", sendername, result); OOCNews(COLOR_NEWS,string); PlayerInfo[playerid][pNewsSkill] ++; if(PlayerInfo[playerid][pNewsSkill] == 50) { SendClientMessage(playerid, COLOR_YELLOW, "* Your News Reporter Skill is now Level 2, soon you are able to Fly the News Chopper and talk Live."); } else if(PlayerInfo[playerid][pNewsSkill] == 100) { SendClientMessage(playerid, COLOR_YELLOW, "* Your News Reporter Skill is now Level 3, soon you are able to Fly the News Chopper and talk Live."); } else if(PlayerInfo[playerid][pNewsSkill] == 200) { SendClientMessage(playerid, COLOR_YELLOW, "* Your News Reporter Skill is now Level 4, you can fly the News Chopper now."); } else if(PlayerInfo[playerid][pNewsSkill] == 400) { SendClientMessage(playerid, COLOR_YELLOW, "* Your News Reporter Skill is now Level 5, you can now talk Live with any person you want."); } } else { SendClientMessage(playerid, COLOR_GREY, " You are not in the News Van or Chopper !"); return 1; } } else { SendClientMessage(playerid, COLOR_GREY, " You are not a News Reporter !"); } }//not connected return 1; }[/pawn] Link to comment Share on other sites More sharing options...
impulse81 Posted March 12, 2012 Author Report Share Posted March 12, 2012 cand pun cmd imi da aceste erori:[pawn] if(newcar == nr1 || newcar == nr2 || newcar == nr3 || newcar == nr4 || newcar == nrh) { GetPlayerName(playerid, sendername, sizeof(sendername)); new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= ' ')) { idx++; //asta este linia 41113 } new offset = idx; new result[64]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; }[/pawn] Link to comment Share on other sites More sharing options...
TzAkS Posted March 12, 2012 Report Share Posted March 12, 2012 Posteaza si erorile! Link to comment Share on other sites More sharing options...
impulse81 Posted March 12, 2012 Author Report Share Posted March 12, 2012 F:\Metin12\BackUps\samp03\pawno\include\JunkBuster.inc(3238) : warning 201: redefinition of constant/macro (symbol "OnPlayerEnterRaceCheckpoint")F:\Metin12\BackUps\samp03\gamemodes\OnSpeed.pwn(14000) : warning 216: nested commentF:\Metin12\BackUps\samp03\gamemodes\OnSpeed.pwn(41098) : error 017: undefined symbol "pRadio"F:\Metin12\BackUps\samp03\gamemodes\OnSpeed.pwn(41115) : error 029: invalid expression, assumed zeroF:\Metin12\BackUps\samp03\gamemodes\OnSpeed.pwn(41115) : error 001: expected token: ")", but found ";"F:\Metin12\BackUps\samp03\gamemodes\OnSpeed.pwn(41115) : error 036: empty statementF:\Metin12\BackUps\samp03\gamemodes\OnSpeed.pwn(41115) : fatal error 107: too many error messages on one lineCompilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase5 Errors. Link to comment Share on other sites More sharing options...
yoobogdan Posted March 13, 2012 Report Share Posted March 13, 2012 La pInfo, intre celelalte pune "pRadio" Scriptez contra cost pe orice GM, mai multe detalii prin pm Link to comment Share on other sites More sharing options...
TzAkS Posted March 13, 2012 Report Share Posted March 13, 2012 pui pRadio la pInfo si la comanda /buy adaugi radio si pui sa seteze pRadio pe 1 daca il cumpara. Link to comment Share on other sites More sharing options...
Question
impulse81
cum fac la comanda /news de la news reporter , sa vada ce scrie reporterii pe /news numa cei care au cumparat radio de la 24/7? Si cum fac sa cumperi radio de la 24/7 ?
aceasta este comanda:
[pawn] if(strcmp(cmd, "/news", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pLeader] == 9)
{
new newcar = GetPlayerVehicleID(playerid);
if(PlayerInfo[playerid][pMuted] == 1)
{
SendClientMessage(playerid, TEAM_CYAN_COLOR, " You cannot speak, you have been silenced !");
return 1;
}
if(newcar == nr1 || newcar == nr2 || newcar == nr3 || newcar == nr4 || newcar == nrh)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
result[0] = toupper(result[0]);
if(FindIP(result)) /// Anti-Reclama
{
new advertiser[MAX_PLAYER_NAME];
GetPlayerName(playerid, advertiser, sizeof(advertiser));
format(string, sizeof(string), "AdmCmd: %s was warned & kicked by Server BOT, reason: Server Advertising",advertiser);
SendClientMessageToAll(COLOR_LIGHTRED,string);
KickLog(string);
PlayerInfo[playerid][pWarns] += 1;
Kick(playerid);
return 1;
}
for(new s = 0; s < num_words; s++)
{
new pos;
while((pos = strfind(result,Swears,true)) != -1) for(new i = pos, j = pos + strlen(Swears); i < j; i++)
{
result = '*';
}
}
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /news [newstext]");
return 1;
}
format(string, sizeof(string), "NR %s: %s", sendername, result);
OOCNews(COLOR_NEWS,string);
PlayerInfo[playerid][pNewsSkill] ++;
if(PlayerInfo[playerid][pNewsSkill] == 50)
{ SendClientMessage(playerid, COLOR_YELLOW, "* Your News Reporter Skill is now Level 2, soon you are able to Fly the News Chopper and talk Live."); }
else if(PlayerInfo[playerid][pNewsSkill] == 100)
{ SendClientMessage(playerid, COLOR_YELLOW, "* Your News Reporter Skill is now Level 3, soon you are able to Fly the News Chopper and talk Live."); }
else if(PlayerInfo[playerid][pNewsSkill] == 200)
{ SendClientMessage(playerid, COLOR_YELLOW, "* Your News Reporter Skill is now Level 4, you can fly the News Chopper now."); }
else if(PlayerInfo[playerid][pNewsSkill] == 400)
{ SendClientMessage(playerid, COLOR_YELLOW, "* Your News Reporter Skill is now Level 5, you can now talk Live with any person you want."); }
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You are not in the News Van or Chopper !");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You are not a News Reporter !");
}
}//not connected
return 1;
}[/pawn]
Link to comment
Share on other sites
6 answers to this question
Recommended Posts