25.07.2009, 21:21
Hello.
I need help.
This is my declaration of Stores:
This is my command:
This is my PlayerToPoint function:
This is my error:
How do i solve this
I need help.
This is my declaration of Stores:
pawn Код:
new Stores[11][3] = {
{-27.312299,-29.277599,1003.557250},
{-25.132598,-139.066986,1003.546875},
{-30.946699,-89.609596,1003.546875},
{6.091179,-29.271898,1003.549438},
{-25.884498,-185.868988,1003.546875},
{207.737991,-109.019996,1005.132812},
{161.391006,-93.159156,1001.804687}
{501.980987,-69.150199,998.757812},
{373.825653,-117.270904,1001.499511},
{369.579528,-4.487294,1001.858886},
{373.825653,-117.270904,1001.499511},
};
pawn Код:
if(strcmp(cmd, "/robstore", true) == 0)
{
if(!PlayerToPoint(6.0, playerid, Stores))
{
SendClientMessage(playerid, COLOR_RED, "You have to be at a store.");
}
if(PlayerToPoint(6.0, playerid, Stores))
{
if(RobbedTime[playerid] == 1)
{
SendClientMessage(playerid, COLOR_YELLOW, "You can only rob a store once after logging in!");
}
if(RobbedTime[playerid] == 0)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
new robmoney = random(30000);
SendClientMessage(playerid, 0xFF0000FF, " You have robbed a store.");
RobbedTime[playerid] = 1;
format(string, sizeof(string), "** HQ: A store in Las Venturas has been robbed!!!!!. **", sendername);
SendRadioMessage(1, TEAM_BLUE_COLOR, string);
WantedPoints[playerid] =20; SetPlayerCriminal(playerid,255, "Robbing a store");
format(string,sizeof(string), "* %s shouts 'GET DOWN THE FLOOR' as he robs a store.", sendername);
SendClientMessage(playerid, COLOR_YELLOW, "You have been seen on the security cameras! Run away!");
ProxDetector(30.0, playerid, string, COLOR_DARKBLUE,COLOR_DARKBLUE,COLOR_DARKBLUE,COLOR_DARKBLUE,COLOR_DARKBLUE);
format(string, sizeof(string), "** You have successfully stolen $%d!",robmoney);
SendClientMessage(playerid,COLOR_YELLOW,string);
GivePlayerMoney(playerid, robmoney);
}
}
return 1;
}
pawn Код:
public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
{
if(IsPlayerConnected(playerid))
{
new Float:oldposx, Float:oldposy, Float:oldposz;
new Float:tempposx, Float:tempposy, Float:tempposz;
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
tempposx = (oldposx -x);
tempposy = (oldposy -y);
tempposz = (oldposz -z);
//printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
{
return 1;
}
}
return 0;
}
Quote:
C:\Users\Monica\Desktop\samp\Chrham's RPG\samp02Xserver.win32\gamemodes\gf.pwn(14823) : error 035: argument type mismatch (argument 3) C:\Users\Monica\Desktop\samp\Chrham's RPG\samp02Xserver.win32\gamemodes\gf.pwn(14827) : error 035: argument type mismatch (argument 3) |