Is there a posibility to make an red circle / rec checkpoint on a location and if you get in that parameter a message to appear ?
Like : I go into that circle and the message appears : Command /buydrugs ? |
SetPlayerCheckpoint(playerid,Float:x,Float:y,Float:z,Float:size);
public OnPlayerEnterCheckpoint(playerid)
{
//do something
return 1;
}
Ok but I don't want that red circle to be shown on my gps . Is that possible ? I want to make it like a simple pickup icon.
|
SetPlayerMapIcon(playerid, iconid, Float:x, Float:y, Float:z, markertype, color, style);
if(IsPlayerInRangeOfPoint(playerid,15.0,x,y,z)// where x,y,z are checkpoints coords
{
SetPlayerCheckpoint(playerid,...)
if(IsPlayerInRangeOfPoint(playerid,15.0,-78.2537,-1135.9974,1.0781)// where x,y,z are checkpoints coords
{
SetPlayerCheckpoint(playerid, -78.2537, -1135.9974, 1.0781, 5);
return 1;
}
D:\Games\GTA San Andreas\server\gamemodes\slrpg.pwn(4998) : error 001: expected token: ")", but found "{"
I made this
pawn Код:
pawn Код:
|
if(IsPlayerInRangeOfPoint(playerid,15.0,-78.2537,-1135.9974,1.0781))// where x,y,z are checkpoints coords
{
SetPlayerCheckpoint(playerid, -78.2537, -1135.9974, 1.0781, 5);
return 1;
}
if(IsPlayerInRangeOfPoint(playerid, 10, -78.2537 , -1135.9974, 1.0781))// where x,y,z are checkpoints coords
SendClientMessage(playerid, COLOR_HERE, "Would you like to /storedrugs, /withdraw drugs");
SetPlayerCheckpoint(playerid, -78.2537, -1135.9974, 1.0781, 5);
return 1;
}
if (strcmp("/storedrugs", cmdtext, true) == 0)
{
SetPlayerCheckpoint(playerid, -78.2537, -1135.9974, 1.0781, 5);
SendClientMessage(playerid, COLOR_HERE, "Goto the place where you Store/Withdraw your drugs");
return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
SendClientMessage(playerid, COLOR_HERE, "You Have Reached a Place to Store/Withdraw your drugs);
return 1;
}
dcmd_depositdrugs(playerid, params[])
{
if(IsPlayerInCheckpoint(playerid))
{
new amount;
if(sscanf(params, "d", amount))
{
return SendClientMessage(playerid, COLOR_RED, "SERVER: Usage: /depositdrugs [amount]");
}
else if(amount > Drugs[playerid] || amount <= 0)
{
return SendClientMessage(playerid, COLOR_RED, "SERVER: Invalid amount");
}
else
{
new str[64];
Drugs[playerid] -= amount;
PlayerInfo[playerid][pDrugs] += amount;
format(str, 64, "*You have deposited %d grams of drugs", amount);
SendClientMessage(playerid, COLOR_YELLOW, str);
format(str, 64, "*You now have %d grams of drugs in your safe", PlayerInfo[playerid][pDrugs]);
SendClientMessage(playerid, COLOR_YELLOW, str);
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "SERVER: You need to be in a drug checkpoint to use this command");
}
return 1;
}
dcmd_withdrawdrugs(playerid, params[])
{
if(IsPlayerInCheckpoint(playerid))
{
new amount;
if(sscanf(params, "d", amount))
{
return SendClientMessage(playerid, COLOR_RED, "SERVER: Usage: /withdrawdrugs [amount]");
}
else if(amount > PlayerInfo[playerid][pDrugs] || amount <= 0)
{
return SendClientMessage(playerid, COLOR_RED, "SERVER: Invalid amount");
}
else
{
new str[64];
Drugs[playerid] += amount;
PlayerInfo[playerid][pDrugs] -= amount;
format(str, 64, "*You have withdrawn %d grams of drugs", amount);
SendClientMessage(playerid, COLOR_YELLOW, str);
format(str, 64, "*You now have %d grams of drugs in your safe", PlayerInfo[playerid][pDrugs]);
SendClientMessage(playerid, COLOR_YELLOW, str);
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "SERVER: You need to be in a drug checkpoint to use this command");
}
return 1;
}
if (PlayerToPoint(8, playerid,-78.2537,-1135.9974,1.0781,))
if(strcmp(cmd, "/withdraw", true) == 0)