[HELP] fuelstation command
#1

Hello. So I have a "/fuelstation" command, which creates currently a checkpoint and 3dtext label. I want to replace the checkpoint with pickup, but I don't know, how to do that. I tried many options, but after compile, it still gives me warnings about tag mismatch.


See code:

PHP код:
CMD:fuelstation(playerid,params[])
{
    new 
chn;
    if(!
IsPlayerAdmin(playerid)) SendClientMessage(playerid,-1,"Unknown command.");
    else if(
sscanf(params,"s",chn))  SendClientMessage(playerid,-1,"USAGE: /fuelstation [checkpoint name]");
    else
    {
    new 
Float:x;new Float:y;new Float:z;
    
GetPlayerPos(playerid,x,y,z);
    
chn CreateDynamicCP(16501Float:xFloat:yFloat:z, -1); <<It is for creating a pickup
    Create3DTextLabel
("Fuel station: \n/repair, /refuel, /cb (carbomb), \r\n/neon, /gascan"0x008080FFx,y,z40.000);
    
SetPlayerMapIcon(playerid,1,x,y,z,19,0,MAPICON_LOCAL);
    new 
string[256];
    new 
File:checkpoints=fopen("checkpoints.txt"io_append);
    
format(string256"%s = CreateDynamicCP(%f,%f,%f,1.5,0,0,0,100);\r\n"chn,xyz);
    
fwrite(checkpointsstring);
    
fclose(checkpoints);
    }
    return 
1;

Reply
#2

pawn Код:
new modelid = 0, type = 0, streamdistance = 250.0;//MUST DEFINE MODEL ID & TYPE
format(string, 256, "%s = CreateDynamicPickup(modelid, type, %f, %f, %f, -1, -1, -1, streamdistance);\r\n", chn,x, y, z);
Reply
#3

Thanks Weponz
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)