[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


Messages In This Thread
[HELP] fuelstation command - by D1am0nd - 21.01.2016, 12:39
Re: [HELP] fuelstation command - by Weponz - 21.01.2016, 12:53
Re: [HELP] fuelstation command - by D1am0nd - 21.01.2016, 13:13

Forum Jump:


Users browsing this thread: 1 Guest(s)