VladA13D Posted January 10, 2015 Report Share Posted January 10, 2015 Problema intalnita (descriere): Nu functioneaza comanda. Imi da skin 0 ( CJ ) daca pun "space" dupa "/skin" zice " Unknown command " si daca nu pun,zice " Usage: /skin [id] ",dar daca pun id,nu merge.Ero(area / rile) / warning-(ul / urile): Liniile de cod / sursa / script-ul: - if (strcmp("/skin", cmdtext, true, 10) == 0) { new tmp[256]; tmp = strtok ( cmdtext, idx ); if ( !strlen ( tmp ) ) { SendClientMessage(playerid, COLOR_RED, "USAGE: /skin [iD]"); return 1; } SetPlayerSkin(playerid, strval(tmp)); // Do something here return 1; } return 0; } Imagini / Video (optional):Ati incercat sa rezolvati singur?: Da.Nu reusesc. Link to comment Share on other sites More sharing options...
0 Ph0eniX Posted January 10, 2015 Report Share Posted January 10, 2015 Foloseste ZCMD e mult mai simplu... il gasesti aici Comanda ta v-a fi ceva de gen: CMD:skin(playerid,params[]) { new skin; if(sscanf(params,"d",skin)) return SendClientMessage(playerid,-1,"Usage: /Skin [skinID]"); if(skin > 299 || skin < 0) return SendClientMessage(playerid,-1,"ERROR: The skin must be between 0 and 229!"); SetPlayerSkin(playerid,skin); SendClientMessage(playerid,-1,"Have fun with your new skin!"); return 1; } 1 public OnPlayerConnect(playerid) { print("[ERROR] - Unable to establish a connection with the world..."); SendRconCommand("exit"); return 1; } Link to comment Share on other sites More sharing options...
0 Mark S. Posted January 10, 2015 Report Share Posted January 10, 2015 Problema este la setplayrrskin trebuie din asa if (strcmp("/skin", cmdtext, true, 10) == 0) { new tmp[256]; tmp = strtok ( cmdtext, idx ); if ( !strlen ( tmp ) ) { SendClientMessage(playerid, COLOR_RED, "USAGE: /skin [iD]"); return 1; } SetPlayerSkin(playerid, strval(tmp)); // Do something here return 1; } return 0; } trebuie sa pui asa if (strcmp("/skin", cmdtext, true, 10) == 0) { new tmp[256]; tmp = strtok ( cmdtext, idx ); if ( !strlen ( tmp ) ) { SendClientMessage(playerid, COLOR_RED, "USAGE: /skin [iD]"); return 1; } SetPlayerSkin(playerid, tmp); // Do something here return 1; } return 0; } 1 Link to comment Share on other sites More sharing options...
0 NoNamed Posted January 10, 2015 Report Share Posted January 10, 2015 1Daca s-a dat best answer pentru ce mai raspunzi ? T/C 1 Link to comment Share on other sites More sharing options...
Question
VladA13D
Problema intalnita (descriere): Nu functioneaza comanda. Imi da skin 0 ( CJ ) daca pun "space" dupa "/skin" zice " Unknown command " si daca nu pun,zice " Usage: /skin [id] ",dar daca pun id,nu merge.
Ero(area / rile) / warning-(ul / urile):
Liniile de cod / sursa / script-ul: -
Imagini / Video (optional):
Ati incercat sa rezolvati singur?: Da.Nu reusesc.
Link to comment
Share on other sites
3 answers to this question
Recommended Posts