26.06.2015, 01:18
hey guys i was trying to make something but it wont work idk why.
Whole Command.
here is my error lines.
here is my errors
Whole Command.
Код:
COMMAND:rob(playerid, parmas[]) { if(PlayerInfo[playerid][playerteam] != COPS && PlayerInfo[playerid][playerteam] != SPF && PlayerInfo[playerid][playerteam] != FBI) { new tmpid = IsPlayerInBiz(playerid), tmpf[80], message[128], player2; if(tmpid == -1) return SendClientError(playerid, "You are not inside a business."); format(tmpf, sizeof(tmpf), "%s.txt", biz[tmpid][bizname]); if(dini_Int(tmpf, "lastrob") > 0) return SendClientError(playerid, "This business has recently been robbed!"); if(dini_Int(tmpf, "bizcash") < 20000) return SendClientError(playerid, "There is nothing to rob!"); new cashtowin = dini_Int(tmpf, "bizcash") / 5; new rCount = 0,Float:rPos[4]; GetPlayerPos(playerid, rPos[0], rPos[1], rPos[2]); for(new i; i < MAX_PLAYERS; i++) { if(!IsPlayerConnected(i)) continue; if(!IsPlayerInRangeOfPoint(i, 20.0, rPos[0], rPos[1], rPos[2])) continue; if(PlayerInfo[i][playerteam] != PlayerInfo[playerid][playerteam]) continue; rCount++; if(rCount == 1) player2 = i; } if(bizbeingrobbed[tmpid]) return SendClientError(playerid, "Don't spam!"); if(dini_Int(PlayerTeamFile(playerid), "robtimer") >= 1) return SendClientError(playerid, "Your faction can't rob that often!"); bizbeingrobbed[tmpid] = 1; NearMessage(playerid,"========================================================",COLOR_RED); format(message,sizeof(message),"* %s is robbing %s. Do not exit for 2 minutes, else the robbery fails! *",PlayerName(playerid), NoUnderscore(biz[tmpid][biztext])); NearMessage(playerid,message,COLOR_WHITE); NearMessage(playerid,"========================================================",COLOR_RED); format(message, sizeof(message), "13[BIZ ROB] %s is attempting to rob the %s business. Possible win: $%d!", PlayerName(playerid),NoUnderscore(biz[tmpid][biztext]), cashtowin); iEcho(message); SetPVarFloat(playerid, "x", rPos[0]); SetPVarFloat(playerid, "y", rPos[1]); bizalert[tmpid][COPS] = 0; for(new i; i < 15; i++) bizalert[tmpid][i] = 0; SetPVarFloat(playerid, "z", rPos[2]); SetPVarInt(playerid, "isrobbing", cashtowin); SetPVarInt(playerid, "isrobbingbiz", tmpid); SetPVarInt(playerid, "robbingtime", 0); PlayerTemp[playerid][RobBizTimer] = SetTimerEx("RobbingTimer", 1000, 1, "ddfff", playerid, player2, rPos[0], rPos[1], rPos[2]); new Text:Textdraw0; new string[128]; format(string,sizeof(string),"%s",RPName(playerid)); TextDrawSetString(Textdraw0, string); TextDrawLetterSize(Textdraw0, 0.449999, 1.600000); TextDrawAlignment(Textdraw0, 1); TextDrawColor(Textdraw0, -1); TextDrawSetShadow(Textdraw0, 0); TextDrawSetOutline(Textdraw0, 1); TextDrawBackgroundColor(Textdraw0, 51); TextDrawFont(Textdraw0, 1); TextDrawSetProportional(Textdraw0, 1); //Player Textdraws: new PlayerText:Textdraw5[MAX_PLAYERS]; new PlayerText:Textdraw1[MAX_PLAYERS]; new PlayerText:Textdraw2[MAX_PLAYERS]; new PlayerText:Textdraw3[MAX_PLAYERS]; new namestr[MAX_PLAYERS]; Textdraw5[playerid] = CreatePlayerTextDraw(playerid, 496.400054, 423.366607, "usebox"); PlayerTextDrawLetterSize(playerid, Textdraw5[playerid], 0.000000, 2.504072); PlayerTextDrawTextSize(playerid, Textdraw5[playerid], 130.799972, 0.000000); PlayerTextDrawAlignment(playerid, Textdraw5[playerid], 1); PlayerTextDrawColor(playerid, Textdraw5[playerid], 0); PlayerTextDrawUseBox(playerid, Textdraw5[playerid], true); PlayerTextDrawBoxColor(playerid, Textdraw5[playerid], 102); PlayerTextDrawSetShadow(playerid, Textdraw5[playerid], 0); PlayerTextDrawSetOutline(playerid, Textdraw5[playerid], 0); PlayerTextDrawFont(playerid, Textdraw5[playerid], 0); format(namestr,sizeof(namestr),"%02d sec",120-GetPVarInt(playerid, "robbingtime")); Textdraw1[playerid] = CreatePlayerTextDraw(playerid, 489.280090, 432.842590, "Time: 0.59"); PlayerTextDrawLetterSize(playerid, Textdraw1[playerid], 0.449999, 1.600000); PlayerTextDrawAlignment(playerid, Textdraw1[playerid], 3); PlayerTextDrawColor(playerid, Textdraw1[playerid], -1); PlayerTextDrawSetShadow(playerid, Textdraw1[playerid], 0); PlayerTextDrawSetOutline(playerid, Textdraw1[playerid], 1); PlayerTextDrawBackgroundColor(playerid, Textdraw1[playerid], 51); PlayerTextDrawFont(playerid, Textdraw1[playerid], 1); PlayerTextDrawSetProportional(playerid, Textdraw1[playerid], 1); Textdraw2[playerid] = CreatePlayerTextDraw(playerid, 146.079971, 412.757385, "Robbing"); PlayerTextDrawLetterSize(playerid, Textdraw2[playerid], 0.449999, 1.600000); PlayerTextDrawAlignment(playerid, Textdraw2[playerid], 1); PlayerTextDrawColor(playerid, Textdraw2[playerid], -1); PlayerTextDrawUseBox(playerid, Textdraw2[playerid], true); PlayerTextDrawBoxColor(playerid, Textdraw2[playerid], 0); PlayerTextDrawSetShadow(playerid, Textdraw2[playerid], 0); PlayerTextDrawSetOutline(playerid, Textdraw2[playerid], 1); PlayerTextDrawBackgroundColor(playerid, Textdraw2[playerid], 51); PlayerTextDrawFont(playerid, Textdraw2[playerid], 0); PlayerTextDrawSetProportional(playerid, Textdraw2[playerid], 1); Textdraw3[playerid] = CreatePlayerTextDraw(playerid, 132.079971, 410.666656, "Money"); PlayerTextDrawLetterSize(playerid, Textdraw3[playerid], 0.449999, 1.600000); PlayerTextDrawTextSize(playerid, Textdraw3[playerid], 16.639999, 20.458662); PlayerTextDrawAlignment(playerid, Textdraw3[playerid], 1); PlayerTextDrawColor(playerid, Textdraw3[playerid], -1); PlayerTextDrawUseBox(playerid, Textdraw3[playerid], true); PlayerTextDrawBoxColor(playerid, Textdraw3[playerid], 0); PlayerTextDrawSetShadow(playerid, Textdraw3[playerid], 0); PlayerTextDrawSetOutline(playerid, Textdraw3[playerid], 1); PlayerTextDrawFont(playerid, Textdraw3[playerid], 5); PlayerTextDrawSetProportional(playerid, Textdraw3[playerid], 1); PlayerTextDrawShow(playerid,Textdraw0,playerid)); PlayerTextDrawShow(playerid,Textdraw1); PlayerTextDrawShow(playerid,Textdraw2); PlayerTextDrawShow(playerid,Textdraw3); PlayerTextDrawShow(playerid,Textdraw5); return 1; } return 1; }
Код:
PlayerTextDrawShow(playerid,Textdraw0); PlayerTextDrawShow(playerid,Textdraw1); PlayerTextDrawShow(playerid,Textdraw2); PlayerTextDrawShow(playerid,Textdraw3); PlayerTextDrawShow(playerid,Textdraw5);
PHP код:
C:\Users\ardit_000\Desktop\FFS\gamemodes\test.pwn(26782) : error 035: argument type mismatch (argument 2)
C:\Users\ardit_000\Desktop\FFS\gamemodes\test.pwn(26783) : error 035: argument type mismatch (argument 2)
C:\Users\ardit_000\Desktop\FFS\gamemodes\test.pwn(26784) : error 035: argument type mismatch (argument 2)
C:\Users\ardit_000\Desktop\FFS\gamemodes\test.pwn(26785) : error 035: argument type mismatch (argument 2)