20.04.2011, 05:34
Hei
I scripting my RolePlay server and i have a problem ...
I chanaged /ad script.
Old one is this.
New one is this:
So, when I press F5 and i wait when he convert then I get that error:
Can somebody help me ? My idea is this like if I somebody want something to advert then he/she needs to go somevare like ABC studo to do his adver
Can somebody help me ? :/
I scripting my RolePlay server and i have a problem ...
I chanaged /ad script.
Old one is this.
Код:
//----------------------------------[advertise]----------------------------------------------- if(strcmp(cmd, "/advertise", true) == 0 || strcmp(cmd, "/ad", true) == 0) { if(IsPlayerConnected(playerid)) { if(gPlayerLogged[playerid] == 0) { SendClientMessage(playerid, COLOR_GREY, "** You havent logged in yet !"); return 1; } if(PlayerInfo[playerid][pMuted] == 1) { SendClientMessage(playerid, TEAM_CYAN_COLOR, "You cannot speak, you have been silenced"); return 1; } new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= ' ')) { idx++; } new offset = idx; new result[128]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } result[idx - offset] = EOS; if(!strlen(result)) { SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/ad)vertise [advert text]"); return 1; } if ((!adds) && (PlayerInfo[playerid][pAdmin] < 1)) { format(string, sizeof(string), "** Please try again later %d seconds between Advertisements !", (addtimer/1000)); SendClientMessage(playerid, COLOR_GRAD2, string); return 1; } SafeGivePlayerMoney(playerid, -50); format(string, sizeof(string), "ADVERTISEMENT: %s, contact %s (Phone: %d)", result, sendername ,PlayerInfo[playerid][pPnumber]); SendClientMessageToAll(COLOR_ORANGE,string); GameTextForPlayer(playerid, "~w~Advertisement ~n~~w~Price:~g~$50", 4321,1); if (PlayerInfo[playerid][pAdmin] < 1){SetTimer("AddsOn", addtimer, 0);adds = 0;} new y,m,d; new h,mi,s; getdate(y,m,d); gettime(h,mi,s); format(string, sizeof(string), "[%d/%d/%d](%d:%d:%d) %s (Advertisement): %s",d,m,y,h,mi,s, sendername, result); ChatLog(string); } return 1; }
Код:
//----------------------------------[advertise]----------------------------------------------- if(strcmp(cmd, "/advertise", true) == 0 || strcmp(cmd, "/ad", true) == 0) { if(IsPlayerConnected(playerid)) { if(gPlayerLogged[playerid] == 0) { SendClientMessage(playerid, COLOR_GREY, " You havent logged in yet !"); return 1; } if(PlayerInfo[playerid][pLevel] < 2) { SendClientMessage(playerid, COLOR_GREY, " You have to be level 2 to use this function !"); return 1; } if(!PlayerToPoint(3.0,playerid,359.6820,207.0294,1008.3828)) { SendClientMessage(playerid, COLOR_GREY, " You are not at ABC studio !"); return 1; } 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; if(!strlen(result)) { SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/ad)vertise [advert text]"); return 1; } if ((!adds) && (PlayerInfo[playerid][pAdmin] < 1)) { format(string, sizeof(string), " Please try again later %d seconds between Advertisements !", (addtimer/1000)); SendClientMessage(playerid, COLOR_GRAD2, string); return 1; } new payout = idx * 5; if(GetPlayerMoney(playerid) < payout) { format(string, sizeof(string), "* You used %d characters which cost $%d, you don't have enough.", offset, payout); SendClientMessage(playerid, COLOR_WHITE, string); return 1; } SafeGivePlayerMoney(playerid, - payout); SBizzInfo[7][sbTill] += payout; ExtortionSBiz(7, payout); format(string, sizeof(string), "[Advert] %s, Phone: %d", result, PlayerInfo[playerid][pPnumber]); OOCNews(TEAM_GROVE_COLOR,string); format(string, sizeof(string), "~r~Paid $%d~n~~w~Message contained: %d Characters", payout, idx); GameTextForPlayer(playerid, string, 5000, 1); if (PlayerInfo[playerid][pAdmin] < 1){SetTimer("AddsOn", addtimer, 0);adds = 0;} } return 1; }
Код:
C:\Users\Hardo\Desktop\Fort Carsson\gamemodes\SRP.pwn(38613) : error 004: function "PlayerToPoint" is not implemented
Can somebody help me ? :/