if (strcmp(cmd, "/advert", true) ==0 || strcmp(cmd, "/ad", true) ==0) { if(PlayerToPoint(15.0,playerid,1788.4279,-1297.8048,13.3750)) { new name1[256]; GetPlayerName(playerid,name1,sizeof(name1)); if ((strlen(cmdtext) >= 3)&&(strlen(cmdtext) <= 7)) { SendClientMessage(playerid,0xC0C0C0FF, " USAGE: /ad(vert) [text]"); return 1; } format(string,sizeof(string),"Advertisement: %s, contact %s.",cmdtext[3],name1); SendClientMessageToAll(0x00FF00FF,string); return 1; } }
if (strcmp(cmd, "/advert", true) ==0 || strcmp(cmd, "/ad", true) ==0) { if(PlayerToPoint(15.0,playerid,1788.4279,-1297.8048,13.3750)) { new name1[256]; GetPlayerName(playerid,name1,sizeof(name1)); if ((strlen(cmdtext) >= 3)&&(strlen(cmdtext) <= 7)) { SendClientMessage(playerid,0xC0C0C0FF, " USAGE: /ad(vert) [text]"); return 1; } format(string,sizeof(string),"Advertisement: %s, contact %s.",cmdtext[3],name1); SendClientMessageToAll(0x00FF00FF,string); return 1; } else { SendClientMessage(playerid,0xC0C0C0FF, " You aren't in the advert place!"); return 1; } }
Originally Posted by Zamaroht
You mean this?
Код:
if (strcmp(cmd, "/advert", true) ==0 || strcmp(cmd, "/ad", true) ==0) { if(PlayerToPoint(15.0,playerid,1788.4279,-1297.8048,13.3750)) { new name1[256]; GetPlayerName(playerid,name1,sizeof(name1)); if ((strlen(cmdtext) >= 3)&&(strlen(cmdtext) <= 7)) { SendClientMessage(playerid,0xC0C0C0FF, " USAGE: /ad(vert) [text]"); return 1; } format(string,sizeof(string),"Advertisement: %s, contact %s.",cmdtext[3],name1); SendClientMessageToAll(0x00FF00FF,string); return 1; } else { SendClientMessage(playerid,0xC0C0C0FF, " You aren't in the advert place!"); return 1; } } |
if (strcmp(cmd, "/advert", true) ==0 || strcmp(cmd, "/ad", true) ==0) { if(PlayerToPoint(15.0,playerid,1788.4279,-1297.8048,13.3750)) { new name1[256]; GetPlayerName(playerid,name1,sizeof(name1)); if ((strlen(cmdtext) >= 3)&&(strlen(cmdtext) <= 7)) { SendClientMessage(playerid,0xC0C0C0FF, " USAGE: /ad(vert) [text]"); return 1; } format(string,sizeof(string),"Advertisement: %s, contact %s.",cmdtext[3],name1); SendClientMessageToAll(0x00FF00FF,string); return 1; } } else { SendClientMessage(playerid,0xFFFFFFFF, "You are not at the San Andreas News building."); SendClientMessage(playerid,0x00FF00FF, " HINT: A marker has been placed on your map."); return 1; } }
Originally Posted by Zamaroht
I'm guessing that's inside OnPlayerCommandText right? Could you show me the full callback?
|